*BSDThis forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: FreeBSD, Fedora, RHEL, Ubuntu; OS X, Win; have used Slackware, Mandrake, SuSE, Xandros
Posts: 448
Rep:
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.
Distribution: FreeBSD, Fedora, RHEL, Ubuntu; OS X, Win; have used Slackware, Mandrake, SuSE, Xandros
Posts: 448
Original Poster
Rep:
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:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.