PHP5 and Apache2.2 on FreeBSD 6.1-STABLE
I upgraded my system from 5.4-RELEASE to 6.1-STABLE last week, and my web server immediately stopped serving PHP pages, where I had no problem doing so before.
/usr/ports/UPGRADING mentions that PHP has been streamlined and must be recompiled to work with Apache and other packages. After deinstalling, configuring (where applicable), and reinstalling PHP5, php5-extensions, and apache2 to the latest versions, not only are PHP files not being served, but my web server is toast:
"Forbidden You don't have permission to access / on this server."
I edited the new apache config file (now located in /usr/local/etc/apache22/httpd.conf) with my system information, including a DocumentRoot path. But when I start apache, I get some very peculiar errors:
"Warning: DocumentRoot [/www/docs/dummy-host.example.com] does not exist
Warning: DocumentRoot [/www/docs/dummy-host2.example.com] does not exist"
Not only did I confirm that I have set the DocumentRoot path, and that apache is using the correct config file... but these "dummy" paths don't exist in the config file!
I'd greatly appreciate any help in sorting this out. I can't attach my httpd.conf file here, but I'd be glad to get it to you if you'd like a look.
Comment out the virtual hosts section in your httpd.conf. e.g.
LOL... fer kripes' sake: how would I have known that they've booted the vhosts stuff out to an include file?!? Thanks for that... would have been some time before I figured that out!
Still having trouble though: my "main" site loads properly, but the other virtual hosts aren't. I was getting a warning "NameVirtualHost *:80 has no VirtualHosts", which I fixed by ensuring both the NameVirtualHost entry and each separate VirtualHost entry included a value of "*:80". But when I browse to any virtual host address, it redirects to the default host content. Here's what my httpd-vhosts.conf looks like:
ServerAlias SiteA *.SiteA.com
CustomLog /var/log/httpd-SiteA-access.log combined
ServerAlias SiteB *.SiteB.com
CustomLog /var/log/httpd-SiteB-access.log combined
So, what's happening is that SiteA works as expected, but browsing to SiteB brings you to SiteA, or doesn't load at all ("forbidden" error). What am I doing wrong?
In addition, I'm back to my original problem, where PHP files are not loading, and browsing to a PHP page prompts the user to download the page as a file.
Did you get this working. I have the same setup, same situation, same errors. Just no resolutino.
|All times are GMT -5. The time now is 10:13 AM.|