I'm trying to create a virtual host in apache so I can access a local site via localhost but using a different port than the default :80, what I want is that http://localhost:8080
loads my site directly in the folder I specify, I have the following set up in my httpd-vhosts.conf
file which is working partially:
Listen 8080
NameVirtualHost *:8080
<VirtualHost 127.0.0.1:8080>
DocumentRoot "c:\wamp\www\trend\public"
ServerName local.trend
</VirtualHost>
If I go to http://localhost:8080
the page loads fine but if I go to http://local.trend
then it just shows me the same as if I go to http://localhost
is there any way to change it so it works with the server name as well?
Should I edit my hosts
file? I currently have:
127.0.0.1 localhost local.trend