Deoctor Posted February 4, 2010 Share Posted February 4, 2010 Hai i need some one to write one virtual host in the httpd.conf this one i have tried it out. but it is not working. Can some one guide it out.. NameVirtualHost 127.0.0.1 <VirtualHost 127.0.0.1> ServerName project.localhost DocumentRoot "C:\xampp\htdocs\chaitu\support" DirectoryIndex index.php login.php <Directory "C:\xampp\htdocs\chaitu\support"> AllowOverride All Allow from All </Directory> </VirtualHost> Quote Link to comment https://forums.phpfreaks.com/topic/190898-need-httpprojectlocalhost/ Share on other sites More sharing options...
trq Posted February 4, 2010 Share Posted February 4, 2010 Along with your virtual host config you'll need to do something so that that domain project.localhost resolves to your local server. The easiest way to do this is to add an entry to your hosts file. 127.0.0.1 project.localhost Your hosts file will be located within /etc on Linux, and you'll need to search for it on windows. From memory its within C:\windows\system32\drivers\etc (I'm not a windows user) Quote Link to comment https://forums.phpfreaks.com/topic/190898-need-httpprojectlocalhost/#findComment-1006680 Share on other sites More sharing options...
Deoctor Posted February 4, 2010 Author Share Posted February 4, 2010 not working i have tried that one too Quote Link to comment https://forums.phpfreaks.com/topic/190898-need-httpprojectlocalhost/#findComment-1006716 Share on other sites More sharing options...
trq Posted February 4, 2010 Share Posted February 4, 2010 Did you restart Apache after adding the entry? Tried looking in the error log? Quote Link to comment https://forums.phpfreaks.com/topic/190898-need-httpprojectlocalhost/#findComment-1006721 Share on other sites More sharing options...
Deoctor Posted February 4, 2010 Author Share Posted February 4, 2010 i have restarted apache and there is no log being written. The apache is not recognizing the url it is passing to the internet... Quote Link to comment https://forums.phpfreaks.com/topic/190898-need-httpprojectlocalhost/#findComment-1006723 Share on other sites More sharing options...
trq Posted February 4, 2010 Share Posted February 4, 2010 it is passing to the internet... What exactly do you mean? Can we see your hosts file? Quote Link to comment https://forums.phpfreaks.com/topic/190898-need-httpprojectlocalhost/#findComment-1006739 Share on other sites More sharing options...
trq Posted February 4, 2010 Share Posted February 4, 2010 Actually, your NameVirtualHost directive should be.... NameVirtualHost * Quote Link to comment https://forums.phpfreaks.com/topic/190898-need-httpprojectlocalhost/#findComment-1006741 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.