apache

PHP not obeying my defined ETags

What I'm doing I'm pulling an image from the database and sending it to the browser with all the proper headers - the image displays fine. I also send an ETag header, using the SHA1 of the image's content as the tag. The images are getting called semi regularly, so caching is a bit of an issue (won't kill the site, but nice to have). ...

Apache multiple URL to one domain redirect

For the last two day, I've been spending a lot of time to solve my problem, maybe someone can help me. Problem: I need to redirect different url's to one tomcat webbase-dir used for artifactory. following urls should point to the tomcat/artifactory webapp: maven-repo.example.local ; maven-repo.example.local/artifactory ; srv-example/ar...

Problem with configuring mod_wsgi WSGIDaemonProcess option

I am trying to deploy Pinax bundle of Django framework + and selected applications. Here is my apache config: WSGIDaemonProcess ptest python-path=/home/pinax-env/lib/python2.5/site-packages WSGIProcessGroup ptest WSGIScriptAlias / /home/ptest/deploy/pinax.wsgi When I restart apache I get the following error: Invalid option to WSGI d...

PHP when display_errors set to 0 500 in AJAX response

Hello All, I have a wired problem. When I set display_errors to 0 on production enviroment then AJAX request to some PHP script returns apache server error 500 and nothing works. When I set it to 1 then response is 200 and everything seems to be fine. Question is what is the connection between display_errors and server error number. I ...

Make Apache server available on a LAN via custom ServerName

Hi, is it possible to set up an Apache server on a machine which is part of a LAN, then allow machines on the LAN to access the server via a custom ServerName (instead of Localhost). I want to serve a simple website in an office space using a short ServerName (no ports etc if possible), but I want to make sure this is possible (after ori...

Parsing raw apache logs

I need some php code for parsing raw apache logs. In particular, I want the number of times mode=search and the term used for searching. Here is an example: 207.46.195.228 - - [30/Apr/2010:03:24:26 -0700] "GET /index.php?mode=search&term=AE1008787E0174 HTTP/1.1" 200 13047 "-" "msnbot/2.0b (+http://search.msn.com/msnbot.htm)" 212.81.200...

Error headers: ap_headers_output_filter() after putting cache header in htaccess file

Receiving error: [debug] mod_headers.c(663): headers: ap_headers_output_filter() after I included this within the htaccess file: # 6 DAYS <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$"> Header set Cache-Control "max-age=518400, public" </FilesMatch> # 2 DAYS <FilesMatch "\.(xml|txt)$"> Header set Cache-Control "max-age=172...

IndexIgnore in .htaccess to hide directories instead of just files?

Is there an equivalent to IndexIgnore in .htaccess configuration for hiding specific directories (instead of just files)? http://httpd.apache.org/docs/2.0/mod/mod_autoindex.html#indexignore ...

What's the easiest way to add Java servlets to a WAMP configured machine?

I have WAMP installed on my local machine and am looking to serve up charts using jFree's Eastwood charting, which requires me to use servlets. So basically I will insert images with src tags that have URLs pointing to my servlet on the same machine. What's the easiest way to enable servlets on the same machine? Do I need to install a s...

Hosting a web server through an image

Is it possible that, on my Windows machine, I get the vmware player and an ubuntu image and host a web server from that image? ...

Does Apache support PHPIniDir on windows?

PHPIniDir "D:/Dev/PHP/" The above instruction can make my apache die on windows. But I'm just not sure if that's true. BTW,I found xmpp/wampserver copies the php.ini to the directory of httpd.exe,maybe for the lack of support? ...

Recommendations on apache tuning for chat application

Hi, I have a chat application (xmpp / muc) that is going to be served by apache (we might change to nginx later but right now it's not easily done). If a user is in 2 rooms, he'll have between 2 and 4 active connections to the server (long-polling connections), so if we have 200 users per room and we have 5 rooms, what should the Server...

mod_rewrite - Don't get a second rule work

I want to have a url like this: domain.com/css/site.css?test=234 Rule: RewriteEngine On RewriteRule ^([a-z]+)/$ $1.php RewriteRule ^css/([a-zA-Z0-9]+).css?count=(.*)$ css.php?f=$1&test=$2 But I get every time a 404: Not found (site.css) If I have a rule like that it works, just without getting the $_GET-Variable: RewriteEngine On R...

Autoconf macros for Apache and conf.d install process?

I have a package that is using the autotools to build and install. Part of the package is a website that can be run on the local machine. So in the package there is a .conf file that is meant to be either copied or linked to the /etc/apache2/conf.d directory. What's the standard way that packages would do this? If possible, I'd like f...

sendmail working but PHP mail() is failing

I cant seem to send an email using PHP's mail(). I have also tried PHPMailer and Swiftmail with no success. However, the following command on the server delivers mail successfully. cat test.txt | mail -s "test mail" [email protected] Is there a way to trace where the problem is coming from? mail() just seems to return true or false. ...

Definition of Connect, Processing, Waiting in apache bench.

When I run apache bench I get results like: Command: abs.exe -v 3 -n 10 -c 1 https://mysite Connection Times (ms) min mean[+/-sd] median max Connect: 203 213 8.1 219 219 Processing: 78 177 88.1 172 359 Waiting: 78 169 84.6 156 344 Total: 281 389 86.7 391 563 I ...

DirectoryIndex not working because of mod_rewrite?

Requests to www.domainname.com and domainname.com should display index.html, not index.php as it does now. This is the .htaccess file: # -FrontPage- IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti* # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On # RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond ...

RewriteCond simply doesn't work, doesn't check properly if file exists

Hey everybody. I've been trying to solve this for hours now but came up with nothing. Inside .htaccess, whenever somebody requests an image from a folder of my website, I'm trying to check if a file with the same name exists in another folder; if it does, return that file; if it doesn't, return the file originally requested. It seems ...

Apache Rewrite & Alias combined

Hello, We have run into an issue where we have an existing Alias, and we would like to add a rewrite rule to catch all variations of case-insensitive spellings, ie: URL: http://www.example.com/example Alias /example "/var/www/html/web/example" We need a rewrite rule to catch: /ExamPle /exampLE /eXAmple etc ... If anyone could...

java web application best practices

Hi all I'm trying to figure out the optimum way to develop and release a fairly simple web application, and I'm running into several problems. I'll outline the decisions I've made, because somewhere I've clearly gone off the rails.. Hugely grateful for any help! I have what I think is a fairly simple web application. It contains a coupl...