edb Posted April 26, 2008 Share Posted April 26, 2008 Hi everyone. I'm running apache 2.2.8 in the most recently XAMPP release and am trying to set up a virtualhost using the following code in the httpd.conf file; NameVirtualHost * <VirtualHost *> ServerName apress DocumentRoot "C:/Documents and Settings/Ed Barnett/My Documents/Websites/Apress"> </VirtualHost> This code is right at the bottom of the file. I turn apache on and off without the above code... it even works with "NameVirtualHost *" in the code... but if I include anything more it simply won't allow me to start apache again. Can anyone help? Link to comment https://forums.phpfreaks.com/topic/103049-apache-228-cannot-run-when-i-specificy-virtualhost-s/ Share on other sites More sharing options...
edb Posted April 26, 2008 Author Share Posted April 26, 2008 I can see the reason firstly - bad code... a premature ">" after DocumentRoot was specified. However, I still can't get apache to run again. Help still needed ( Plus now the "localhost" returns the following; Bad request! Your browser (or proxy) sent a request that this server could not understand. If you think this is a server error, please contact the webmaster. Error 400 localhost 04/26/08 19:57:17 Apache/2.2.8 (Win32) DAV/2 mod_ssl/2.2.8 OpenSSL/0.9.8g mod_autoindex_color PHP/5.2.5 Link to comment https://forums.phpfreaks.com/topic/103049-apache-228-cannot-run-when-i-specificy-virtualhost-s/#findComment-527851 Share on other sites More sharing options...
wildteen88 Posted April 27, 2008 Share Posted April 27, 2008 When setting up Virtualhosts on Apache I found this tutorial usefull. Also to see why Apache is not starting up it should log the error in Apaches error log. Link to comment https://forums.phpfreaks.com/topic/103049-apache-228-cannot-run-when-i-specificy-virtualhost-s/#findComment-528242 Share on other sites More sharing options...
edb Posted April 27, 2008 Author Share Posted April 27, 2008 Thanks for the reply wildteen. I set up the other virtualhost to point to the original localhost htdocs directory now but the following error comes up which is described in the error log as follows; The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script. In the log : C:/Program Files/xampp/htdocs/xampp/.htaccess: Invalid file path C:\\Program FilesC:\\Program Files\\xampp\\security\\xampp.users Link to comment https://forums.phpfreaks.com/topic/103049-apache-228-cannot-run-when-i-specificy-virtualhost-s/#findComment-528405 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.