cs.punk Posted May 28, 2011 Share Posted May 28, 2011 I'm basically trying to set up a zend project. So in the book I'm reading, they state it's a 'good idea' to define a virtual host to point it to the 'application's public directory'... So they say add this to httpd.conf NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot "/usr/local/apache/htdocs/square/public" ServerName square.localhost </VirtualHost> So I should be able to go to 'square.localhost/' but nope... However if I go to localhost/ I get the zend 'home splash screen' but it seems to be missing css/images? Any ideas ? And yes I did restart the apache server. Quote Link to comment https://forums.phpfreaks.com/topic/237709-setting-up-a-virtual-host/ Share on other sites More sharing options...
trq Posted May 29, 2011 Share Posted May 29, 2011 Have you added square.localhost to your DNS server or hosts file? Quote Link to comment https://forums.phpfreaks.com/topic/237709-setting-up-a-virtual-host/#findComment-1221758 Share on other sites More sharing options...
cs.punk Posted May 29, 2011 Author Share Posted May 29, 2011 No I haven't. Thought it didnt apply if I'm not on a network.. Ok so I figured I have to modify windows/system32/drivers/etc/host.. What do I add? 127.0.0.1 square? Much appreciated Quote Link to comment https://forums.phpfreaks.com/topic/237709-setting-up-a-virtual-host/#findComment-1221825 Share on other sites More sharing options...
trq Posted May 29, 2011 Share Posted May 29, 2011 Your computer needs to be able to resolve the hostname from somewhere. Add.... 127.0.0.1 square.localhost Quote Link to comment https://forums.phpfreaks.com/topic/237709-setting-up-a-virtual-host/#findComment-1221827 Share on other sites More sharing options...
cs.punk Posted May 30, 2011 Author Share Posted May 30, 2011 Much appreciated! Worked a treat. Quote Link to comment https://forums.phpfreaks.com/topic/237709-setting-up-a-virtual-host/#findComment-1222307 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.