I've been trying this for several days now, I've followed a few tutorials (those on digital ocean I've found particularly clear) but still stuck.
Ubuntu 16.04
Installed apache2 and all dependencies. Opened iptables:
iptables -A INPUT -i $IFACE_ETH -m state --state NEW -p tcp --dport 8080 -j ACCEPT
Forwarded the port on the router and confirmed from 2 different websites that 8080 is open.
chmod -R 755 on /var/www
setup and activated site on apache2 and restarted apache2:
<VirtualHost *:8080>
ServerAdmin webmaster@localhost
ServerName first
ServerAlias www.first
DirectoryIndex index.php
DocumentRoot /var/www/first/public_html
<Directory /var/www/first/public_html/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Put the page into /etc/hosts
If I browse to localhost the page gets served fine. If I try to browse to it via my dynamic dns i
p (I've also tried typing in my external IP) the page just gets stuck at loading and eventually times out (stops loading and shows and blank white page rather than saying "connection has timed out"). I know the dynamic ip is working as I can ssh in with this manner no problem.
What am I not doing?
TIA
sudo iptables -v -x -n -L
. For "setup and activated site on apache2 and restarted apache2" tell us exactly what you did. For the file segment: Is it the whole file or a segment? What is the full file name, including path. What do you mean by "Put the page into /etc/hosts".