apache

Using Apache as a proxy in conjunction with the Apache alias directive

When using ProxyPass in apache, it won’t obey any aliases. Apachectl configtest won’t complain, so you could end up messing around with this for a while (like I did) . For example:

[...]
Alias /foo /absolute/path/to/foo
ProxyPass / localhost:8080
[...]

In the example above the alias directive wont have anything to ‘say’. In my access.log I noticed this when clients trying to access stuff from the alias’ed dir got a 404 .
You can fix this easily by:

Alias /foo /absolute/path/to/foo
ProxyPass /foo !
ProxyPass / localhost:8080

you’re simply telling apache not to oproxy /foo 🙂
Thank you mail-archives.apache.org and httpd.apache.org mod_proxy documentation.

CentOS http and php

setting up Apache, mysql and php on a Centos box. Centos default to

short_open_tag = Off
[/bash]
In php.ini. This means if you’re like me and throwing up a phpinfo.php script to test php after installation, remember to either set this setting to On, or remember to specify php in top of you php scripts (I’ve goten lazy, haven’t specified that for a while) .
While I’m at it, got to rant a bit about:
Debian just makes it all so much easier configuring Apache !!

SSL and .pem problems while setting up ifolder test server.

I’m looking at ifolder, and during installation on my test server I spent some time trying to get my head around the ifolder documentation regarding using .pem certificates with apache2. They explicitly say you have to export your self signed certificate as .pem with ‘ca certificate only’, on my OpenSuse test server /var/log/apache2/error.log kept on giving me

Init: Private key not found

This post gave me a hint on how to resolve this. Exporting the certificate as specified in the ifolder administrator documentation as ‘ca certificate AND the private key’ solved it all.