how do I set up a virtual host (it's not working, and I've done everything right)
Posted
by
piratepartypumpkin
on Super User
See other posts from Super User
or by piratepartypumpkin
Published on 2012-09-25T21:23:16Z
Indexed on
2012/09/25
21:39 UTC
Read the original article
Hit count: 271
My router redirects port 80 to port 8080. My router works fine and my domain name is routed properly.
This is my virtual hosts file:
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot /home/admins/lampstack-5.3.16-0/apps/wordpress
ServerName example.com
ServerAlias www.example.com
</VirtualHost>
I can access my website by entering "mywebsite.com:8080" but I cannot access it by entering "mywebsite.com"
For further information, this is a part of my httpd.conf:
Listen 8080
Servername localhost:8080
DocumentRoot "/home/admins/lampstack-5.3.16-0/apache2/htdocs
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny, allow
deny from all
</Directory>
<Directory "/home/admins/lampstack-5.3.16-0/apache2/htdocs">
Options FollowSymLinks
AllowOverride None
Order allow, deny
allow from all
</Directory>
© Super User or respective owner