> -----Original Message----- > From: Jon Shoberg [mailto:[EMAIL PROTECTED]] > Sent: Sunday, 22 April 2001 00:39 > To: phpgeneral > Subject: [PHP] [Apache] Win32 Virtual Host - Sub Domain > > > Sorry for the OT post but this has me stumped and Google is > not giving me > any good leads. A good lead is the Apache manual on virtual hosting; http://httpd.apache.org/docs/vhosts/index.html in particular; http://httpd.apache.org/docs/vhosts/name-based.html in the examples shown there you will notice the virtualHost line is; <VirtualHost 111.22.33.44> ie it uses an IP address, your config uses a host name; > <VirtualHost test.localhost> so on startup Apache will try to resolve test.localhost to an IP address. It fails so ignores the virtual host entry. You could probably fix it by adding an entry to you hosts file like 127.0.0.1 test.localhost but I think this would only be good for requests coming from a browser on the server machine. For simple installations I think you will find an entry like; <VirtualHost *> will work well (it also allows you to use dynamic DNS without changing your config file). The example in the documentation also does not use a trailing slash in the document root. I don't know if this is important but with some config directives it is so I generally follow the documentation *exactly*. So the complete virtual host entry would be; <VirtualHost *> ServerAdmin webmaster@localhost DocumentRoot "C:/Program Files/Apache Group/Apache/htdocs/test" ServerName test.localhost ErrorLog logs/test.localhost-error_log CustomLog logs/test.localhost-access_log common </VirtualHost> HTH Andrew Braund > > I am trying to setup Apache with PHP on Win32 (don't ask > why). Anyhow, PHP > is working great but virtual hosting is not going so well. > When the browser > brings up http://localhost/ it reads from [Apache > Root]/apache/htdocs as > defined by: > > #*** Good Virtual ********************************** > > <VirtualHost *> > ServerAdmin webmaster@localhost > DocumentRoot "C:/Program Files/Apache Group/Apache/htdocs/" > ServerName localhost > ErrorLog logs/error_log > CustomLog logs/access_log common > </VirtualHost> > > #*************************************************** > > What are are tring to do is setup http://test.localhost/ > and it is not > working here is the virtual host and apache restart ... > > #*** Bad Virtual *********************************** > > [Sat Apr 21 09:55:33 2001] [error] Cannot resolve host name > est.localhost --- ignoring! > The Apache service is restarting. > The Apache service has restarted. > > <VirtualHost test.localhost> > ServerAdmin webmaster@localhost > DocumentRoot "C:/Program Files/Apache Group/Apache/htdocs/test/" > ServerName test.localhost > ErrorLog logs/test.localhost-error_log > CustomLog logs/test.localhost-access_log common > </VirtualHost> > > #*************************************************** > > Any thoughts on getting Win32 to resolve that test.localhost name ? > > Thanks > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: > [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to