Originally Posted by
rekahsoft
Hi all, I am looking to host a pos system internally on my LAN but also want to host a website; both on different ports. My external ip is updated by ddns by my roughter running dd-wrt (to host: rekahsoft.homelinux.org). I want to accept connections on port 80 for this site and then have a pos system accessible over my network on port 8080 (i have dhcp reserves on my roughter for my server so it has static ip). What would my /etc/apache2/httpd.conf look like? This was what i was trying but it didn't seem to work
Code:
Listen 80
Listen 8080
NameVirtualHost localhost:80
NameVirtualHost localhost:8080
<VirtualHost localhost:80>
ServerName rekahsoft.homelinux.org
DocumentRoot /var/www
</VirtualHost>
<VirtualHost localhost:8080>
ServerName pos.rekahsoft.local
DocumentRoot /var/www/pos
</VirtualHost>
Thanks everyone
Its because you have it in the wrong, it has to be in order. You can't do it like that. Plus you don't need the "Listen *" statements if you are doing a virtual host.
It should look like this:
Code:
NameVirtualHost localhost:80
<VirtualHost localhost:80>
ServerName rekahsoft.homelinux.org
DocumentRoot /var/www
</VirtualHost>
NameVirtualHost localhost:8080
<VirtualHost localhost:8080>
ServerName pos.rekahsoft.local
DocumentRoot /var/www/pos
</VirtualHost>
Also you need at least one Directory statement. Like this:
Code:
<Directory /var/www/>
Options FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Bookmarks