Virtual Host with WAMP

帅比萌擦擦* 提交于 2019-12-04 11:47:46

Probably some bad config in vhosts file. Try to start apache from commandline so you get the error output. That will help you identify your problem.

Yuki Kutsuya

Open your hosts file (\WINDOWS\system32\drivers\etc\hosts). Add this line to the bottom:

127.0.0.1        test

This will tell your computer that any url that contains test will be routed to 127.0.0.1 (localhost).

Now open httpd.conf and add this to the very bottom of the file:

NameVirtualHost *:80  
<VirtualHost *:80>  
    DocumentRoot "c:/wamp/www/myfirstsite/"  
    ServerName testsite  
</VirtualHost> 

Now restart apache and navigate to: http://test/ (you may have to restart your browser for the changes to take effect.)

Hope this works.

Go to C:/drive and choose wamp folder

and go to C:\wamp\bin\apache\Apache2.4.4\conf and choose httpd.conf file.

Edit with notepad and go to 58 line number

change Listen 80 and replace Listen 8181 Save file and restart your Apache server

Now check url such like this localhost:8181

I have used this hop you will be success.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!