Web Hosting Talk







View Full Version : simple Virtual Host question


lemondude
04-02-2010, 12:33 AM
Hi I'm currently having problem with my virtual host code. Whenever I add further permission I get a internal error error message. Can anyone help?


here's my code

Working


NameVirtualHost *:80


<VirtualHost *:80>
DocumentRoot "C:/Apache Software Foundation/Apache2.2/var/www/project1/htdocs"
ServerName localhost
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "c:/vh/htdocs"
ServerName newserver


php_value include_path ".;C:/vh/include;c:/program files/php/pear"
php_value magic_quotes_gpc off
php_value register_globals off

</VirtualHost>



When I add

<Directory "c:/vh/htdocs">
AllowOverride All
Options All
</Directory>

it won't work, gives me an internal error when I try to access anyfile or do anything.

here's the not working code


NameVirtualHost *:80


<VirtualHost *:80>
DocumentRoot "C:/Apache Software Foundation/Apache2.2/var/www/project1/htdocs"
ServerName localhost
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "c:/vh/htdocs"
ServerName giantfrenzy

<Directory "c:/vh/htdocs">
AllowOverride All
Options All
</Directory>


php_value include_path ".;C:/vh/include;c:/program files/php/pear"
php_value magic_quotes_gpc off
php_value register_globals off

</VirtualHost>




any help would be appreciated. Thanks

mattle
04-02-2010, 08:26 AM
First thing I would do is get rid of the VirtualHost for the apache docs. You should always test your config before restarting apache: http://www.tech-recipes.com/rx/112/test-the-apache-configuration-file-httpdconf/

If you're serving pages and getting an Error 500, the first place you want to look is in your error_log. Post the messages that are getting logged when you try to access your site.

tim2718281
04-02-2010, 12:01 PM
php_value magic_quotes_gpc off
php_value register_globals off


I've not used that configuration format myself.

But shouldn't it be

php_flag magic_quotes_gpc off
php_flag register_globals off