You are not logged in.

#1 2009-08-29 13:13:52

voice
Member
Registered: 2009-06-09
Posts: 8

[solved] PHP doesn't work with apache's vhosts, but works....

Hello.

I need help to resolve one problem. I installed (like in wiki says) Apache2 and PHP, and all works fine with default configurations.
Then I uncommented next line in httpd.conf:

Include conf/extra/httpd-vhosts.conf

And change httpd-vhosts.conf file in next way:

NameVirtualHost *:80
<VirtualHost *:80>
    ServerAdmin voice@somedomen.com.ua
    DocumentRoot "/srv/vhosts/foo"
    ServerName foo

    <Directory /srv/vhosts/foo>
        Options All
        AllowOverride All
        Order allow,deny
        Allow from all                                                                                                                                     
    </Directory>
</VirtualHost>

And all looks like still works fine, I can access to my virtual host thought browser, view/downloads files. But PHP-files doesn't work. When I try to open php-file in browser server returns me text/html like content type and file with 0 length.
Has someone ideas?
Thanks for help.

Last edited by voice (2009-09-01 19:05:08)


Everything is file, and file is everything.

Offline

#2 2009-08-29 16:06:16

neddie_seagoon
Member
Registered: 2009-08-23
Posts: 121

Re: [solved] PHP doesn't work with apache's vhosts, but works....

Do your PHP configuration lines in httpd.conf (loadmodule, addtype etc) come before or after the line that includes httpd-vhosts? If it comes after, change the order so the httpd-vhosts are loaded last.

Check as well that /srv/vhosts is listed in /etc/php.ini for open_basedir.
Also check /var/log/httpd/error.log for any clues as to what else may be failing.

Offline

#3 2009-08-30 11:48:59

voice
Member
Registered: 2009-06-09
Posts: 8

Re: [solved] PHP doesn't work with apache's vhosts, but works....

neddie_seagoon wrote:

Check as well that /srv/vhosts is listed in /etc/php.ini for open_basedir.

Thanks a lot, this was a problem.
Before I used Debian distribution and then open_basedir is off.


Everything is file, and file is everything.

Offline

Board footer

Powered by FluxBB