apache

how to? mod_rewrite in different .htaccess files per folder move into vhost.conf - mvc

Hi there, I hope I will find a help here. I have a quite complex MVC driven application. Here how it works: these are my directories / - (/dispatcher.php as mvc1 app bootstrap) /mvc2 - (/mvc2/dispatcher.php as mvc2 app bootstrap) /mvc3 - (/mvc3/dispatcher.php as mvc3 app bootstrap) all 3 are accesible under one domain example.com...

conditional DirectoryIndex in .htaccess

Hi, Is it possible to make the DirectoryIndex value in a .htaccess file conditional based on IP, so that - for example - my IP see's DirectoryIndex as index.html and everyone else sees DirectoryIndex as index.php? Is there a solution other than mod_rewrite? ...

(13)Permission denied: access to /cgi-bin/test.cgi denied

Hi, I am tryning out CGI-scripts for the first time but without success. I have read many tutorials and followed may threads in different forums but I can not make it work. I am using a appache web server on a Fedora 10 machine. I always have problem with [Wed Oct 21 20:47:36 2009] [notice] SELinux policy enabled; httpd running as con...

Running multiple sites on a LAMP with secure isolation

Hi everybody, I have been administering a few LAMP servers with 2-5 sites on each of them. These are basically owned by the same user/client so there are no security issues except from attacks through vulnerable deamons or scripts. I am builing my own server and would like to start hosting multiple sites. My first concern is... ISOLATION...

Setting expires header for a specific URI?

Hello I'm trying to set expire header for a specific URI but for some reason it is not working, what I've done so far in the httpd.conf file was the following: <LocationMatch "/mysite/contentservices/weather/get.json"> ExpiresDefault A86400 </LocationMatch> <LocationMatch "/mysite/*"> Options FollowSymLinks MultiViews AllowOver...

Jboss 5 Integration with Apache 2.2

I have successfully integrated Jboss with Apache. I can pull up http://localhost/web-console .... now when I drop a war file into my Jboss deploy directory I can pull it up here localhost:8080/helloworld/hi.jsp BUT NOT here localhost/helloworld/hi.jsp Isn't the point of integrating Jboss with apache so I do not have to do :8080? and I...

Drupal Development on a Thumb Drive

I mostly a .NET developer but need to do some new work in Drupal. So I guess I need a portable - Apache - PHP - MySQL - phpMyAdmin - Drupal codebase What is the best way to work with the environment on a portable / thumb drive? I'm on Windows. I want to go portable because I work on 3 to 4 different machines throughout the week. Is...

Apache Ant command line arguments without double quotes - is it possible?

Today I had to add a task to an Apache Ant file. The command line should have been something like myprogram --param1 --param2 path\somefile 2> path\logfile The problem with this was that if I used something like the following for this <exec executable="$(myprogram)" <arg value="--param1"> <arg value="--param2"> <arg path="$(som...

Debugging memory usage in mod_php

I have a request handler running in apache/mod_php which occasionally expands beyond the maximum allowed memory usage (ie, the memory_limit definition in in php.ini). Handling this request calls proc_open() to run external commands. Is the memory usage of those commands counted "against" the requests memory usage? Beyond that, what are...

Handling delays when retrieving files from remote server in PHP

Hello, I am working with PHP to access files and photos from remote servers. I am mostly using the file_get_contents() and copy() functions. Sometimes accessing a small text file or photo is almost instant, but other times it seems to get "stuck" for a minute on the same exact file. And sometimes it actually causes my script to hang,...

How to clear PHP $_SESSION by apache?

I restarted apache,but the session doesn't expire! ...

psycopg2 and mod_python import error

I am trying to setup roundup on a windows XP machine. I use psycopg2 v2.0.13 and when i import the psycopg2 module from the shell it all works fine, but when mod_python tries to do it, I get this error: MOD_PYTHON ERROR ProcessId: 3464 Interpreter: 'roundup' ServerName: 'roundup' DocumentRoot: 'C:/Dev/roundup/tracker' U...

GZip encoding - what are the potential issues (old versions of IE etc)?

I can vaguely remember that there are certain older versions of certain browsers that do weird things with GZip encoding - in particular I seem to recall a bug in IE which resulted in JavaScript sent over GZip getting mangled. Vague recollections aren't much practical use though. Does anyone know exactly what kind of issues there are an...

Joomla External Domain Problem

Hello everybody! I've got a problem with Joomla 1.5.+, hope you can help me. I installed it on a server which is in an internal DMZ and want to access it via an internet domain. The problem is that some references on the site still point to the internal domain. I've read that in the earlier Mamboo-days of Joomla a variable "$mosConfig_...

How do you convert audio files (on the fly) to the browser?

I would like to be able to convert audio files to MP3 to the users browser on the fly. The software I am using is: Apache, PHP & FFMPEG on an ubuntu system. Here is the code I have so far: <?php header("Content-Transfer-Encoding: binary"); header("Content-Type: audio/mpeg, audio/x-mpeg, audio/x-mpeg-3, audio/mpeg3"); pas...

How to enable .htaccess in httpd.conf on XP?

I would like to use mod_rewrite() on my apache setup on a windows machine. As you probably know, Windows doesn't use Unix-style hidden filenames like ".htaccess." So should I change AccessFileName .htaccess to AccessFileName xyz.htaccess ? or there is something else I need to do? ...

htaccess redirect from /foo/bar/mydocument.doc to /foo/bar/auth_test.php?q=mydocument.doc

I've got a Web site with a bunch of docs and pdfs in /foo/bar/ Directory browsing is turned off, so you have to know the specific URL/URI combo to get the document. I'd like to find a way of redirecting ALL requests to /foo/bar/ to a php page that checks their auth cookie is set and, if so, gets their file. Of course, I also need the ...

php/timeout/connection to server reset?

I have a php script that needs to run for quite some time. What the script does: connects to mysql initiates anywhere from 100 to 100,000 cURL requests each cURL request returns compact-decoded data of 1 to 2000 real estate listings - i use preg-match-all to get all the data and do one mysql insert per listing. each query never exceed...

Is it possible to have htaccess if else type rewrite conditions and rewrite rules?

I am trying to write an htaccess file that essentially does this: if(requested file == "some-file.php" || requested file == "some-file2.php" || requested file == "some-file3.php") then Rewrite to redirector.php?uri=some-file.php <- substitute requested file without passing any parameters else // existing rewrite conditions from silve...

Can Apache BalancerMember be configured to use unix domain sockets?

I am using the Apache Proxy balancer directive to hook up a set of thin servers (for Rails). Like so: <Proxy balancer://thinservers> BalancerMember http://127.0.0.1:5000 route=thin0 BalancerMember http://127.0.0.1:5001 route=thin1 BalancerMember http://127.0.0.1:5002 route=thin2 </Proxy> However, thin can also be conf...