I've setup my home desktop as a webserver (For testing purpose). I've opened up to the public by configuring port forward in my router. I checked with my friends and realised some of them couldn't access it. At first I thought the nameserver haven't propagate my domain info to the world. But now I realise that my ISP block port 80. Strange thing is some of my friends and I were able to access it.
Anyway, I wanna change the port number from 80 to 8140. So i opened up httpd.conf, and changed to 'Listen 8140' and in the virtualhost settings I set it to:
Code:
<VirtualHost *:8140>
ServerName example.com
DocumentRoot /var/www/html/example
RewriteEngine On
</VirtualHost>
Initially while changing the port number, i encountered this error when restarting httpd:
Code:
Permission denied: make_sock: could not bind to address [::]:8140
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:8140
no listening sockets available, shutting down
Unable to open logs
So I keyed in the following commands in the terminal and it works:
Code:
semanage port -a -t http_port_t -p tcp 8140
service httpd start
In my linksys router config, I went to Applications and Gaming > Port Range Forward and key in the following info for port forwarding:
Code:
Application | Start | End | Protocol | IP Address | Enabled
Example | 8140 | 8140 | TCP | 192.168.1.102 | Checkbox checked
I restarted apache a few times and I still can't access my web example.com:8140 on the browser. However, I was able to access it locally on the webserver with 127.0.0.1:8140
In my nameserver settings, I've set my A records to be:
Code:
Name | IP
example.com. | 112.8.8.1
Where did I go wrong??