Reputation: 1261
I'm having problem getting virtual hosts to work as I want to. I've been searching for the last hours but it feels like I'm more lost than before.
So basically I want the following setup:
Could anyone give me a hint? I must have missed something obvious...
Upvotes: 1
Views: 131
Reputation: 2117
For localhost subdomains you must add that subdomain to /etc/hosts
127.0.0.1 localhost test.localhost
Upvotes: 1
Reputation: 2430
Did you try editing your apache conf file?
Something like this
# vi /usr/local/apache2/conf/extra/httpd-vhosts.conf
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "/usr/local/apache2/docs/thegeekstuff"
ServerName thegeekstuff.com
ServerAlias www.thegeekstuff.com
ErrorLog "logs/thegeekstuff/error_log"
CustomLog "logs/thegeekstuff/access_log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "/usr/local/apache2/docs/top5freeware"
ServerName top5freeware.com
ServerAlias www.top5freeware.com
ErrorLog "logs/top5freeware/error_log"
CustomLog "logs/top5freeware/access_log" common
</VirtualHost>
Upvotes: 0