PHP on CentOS + Plesk VPS

I’m still scratching my a head a bit on this one, but figured I’d at least post my solution to an issue I came across parsing PHP on CentOS 5.2. (If you know the reason for the below, do post in the comments!)

The main problem was that PHP files weren’t being parsed correctly. I confirmed that the PHP module was loaded (/usr/sbin/httpd -M), and my /etc/httpd/conf.d/php.conf file contained the right directives. This was a stock install of CentOS 5.2 after all. I even tried moving some of the directives around to the domain-specific vhosts.conf file. I also confirmed that *.conf files were being loaded by the httpd.conf with “Include conf.d/*.conf” in /etc/httpd/conf/httpd.conf.

Or so I thought. Turns out, I needed to wrap the contents of php.conf with <VirtualHost _default_:80>…</VirtualHost>. I realized this when I ran /usr/sbin/httpd -S to see what was actually being called – and noticed that some SSL directives were pulled in from ssl.conf, but nothing from php.conf. WTF?

So when different ports are supported (i.e. 80 and 443), directives for each now have to be wrapped? I have another CentOS machine (the only other – I don’t get to make these choices) w/o SSL and the php directives are loaded w/o the <VirtualHost…>.

At any rate, I usually opt for Debian-based distros as the folder structures make more sense to me. And I dislike GUIs that attempt to make server management easier for the layman but in fact barf files all over the system (I’m looking at you, Plesk).

Digg! delicious
Posted on Friday, March 6th, 2009 at 2:53 am and filed under Internet, geekery. Subscribe to RSS 2.0. Skip to the end and leave a comment. Pinging disabled.

Leave a Reply