Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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:
No, A records do not include port information. Do you have another machine on the same network that you can use to test access to the site? ... this will rule out the host as the problem source.
yup i got another computer actually. two comps actually =D. but i cannot access example.com:8140 and with the local ip 192.168.1.102:8140 but i can ping 192.168.1.102. but as mentioned, i was able to go to 127.0.0.1:8140 on the host machine itself
Last edited by nuttynibbles; 10-06-2011 at 06:13 PM.
I know this may be a dumb question, but is your servers ip address 192.168.1.102? If it's not set as a static ip. The other computer may have taken that IP from it giving you an unaccessible webserver.
anw 192.168.1.102 is the local address in my network. My other computers are 192.168.1.101 and etc. My public ip is dynamic though. but from the router administration status, i could see it didn't change for the past 2 weeks.
To make things more complicated, if i change the port back to 80, i'm able to access example.com from my other computer. however, most friends outside my network cannot access except for 1 which im not sure why. so i suppose my isp block port 80
Q is should I able to access the web server within the local network with 192.168.1.102:8140 from my other computer @ 192.168.1.101??
Last edited by nuttynibbles; 10-06-2011 at 06:43 PM.
To make things more complicated, if i change the port back to 80, i'm able to access example.com from my other computer. however, most friends outside my network cannot access except for 1 which im not sure why. so i suppose my isp block port 80
Q is should I able to access the web server within the local network with 192.168.1.102:8140 from my other computer @ 192.168.1.101??
Is port 8140 open in your router and set to forward to the correct machine?
hi frankbell, yes i suppose i did open my port and allow port forwarding on 8140 correctly. i followed the steps for router settings @ http://versatile1.wordpress.com/2007...-for-utorrent/ but im using a dhcp for dynamic ip allocation for computers on my network. i guess that is fine as long my local ip dont change and it hasn't change since.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.