My local Apache service is running perfectly fine. I am running WAMP.
I am trying to configure my .httpd file so that I can access specific projects as fully qualified domain names like: mysite.com ( but resolves to something like localhost/myfoldername/).
I was able to get it working with a different port number like:
localhost:8080
And localhost:80
is my root web dir.
Here is my current .httpd config:
listening: 80
(defined higher in the .httpd)
…. below was added to my .httpd
NameVirtualHost 127.0.0.1:8080
Listen 127.0.0.1:8080
<VirtualHost 127.0.0.1:8080>
ServerName www.jobeet.com
DocumentRoot "C:\wamp\www\symfony\jobeet\web"
DirectoryIndex index.php
<Directory "C:\wamp\www\symfony\jobeet\web">
AllowOverride All
Allow from All
</Directory>
Alias /sf C:\wamp\www\symfony\jobeet\lib\vendor\symfony-1.4.8\data\web\sf
<Directory "C:\wamp\www\symfony\jobeet\lib\vendor\symfony-1.4.8\data\web\sf">
AllowOverride All
Allow from All
</Directory>
</VirtualHost>
And here is my Windows host file config:
127.0.0.1 localhost
127.0.0.1:8080 www.jobeet.com.localhost
If anyone has any ideas, please tell me! I've been on this for over 8 hours : ( thx.
Best Answer
A hosts file only supports translations of IP addresses to names, so the
:8080
is totally unnessesary.Additionally, because the hosts file is not actually DNS at all, you don't enter any search suffixes, so you should only enter the entire domain name. SO dump the
.localhost
from it as well. It should read:Of course, then you will lose all access to the REAL
www.jobeet.com
, but you can't have it both ways.