Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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.
Hello:
I am fairly new to Linux/Ubuntu. I have an Ubuntu LTS 16.04 setup with apache. I have 3 domains. They are pointed to my Public IP address and I use namecheap dns service as I am on a dynamic IP address via cable. When I attempt to contact any of my 3 domains, I cannot connect to them. I get ERR_CONNECTION_TIMED_OUT I have set up port forwarding on port 80 to my Ubuntu machine (static)IP 10.0.0.111 If I type 10.0.0.111 from my windows 10 computer (static) IP (10.0.0.110) I can see my index.html page. But only for one website, not the other two.
When I do a nslookup on my domains, it resolves to my public IP.
What am I doing wrong? I have been searching for help for weeks.
Last edited by sternfanatic; 02-15-2018 at 03:42 PM.
Reason: added port forwarding photo
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Rep:
That browser error usually indicates something is wrong on the system in question. You might have messed up the port forwarding. Did you use iptables? Post the commands. You can also have that problem due to browser issues such as history and cookies. You can clear that out of the browser. But it's probably the port forwarding is askew.
Can you connect to other websites?
I don't know if hosting multiple domains on a single server works if they all resolve to the same IP.
I agree. Given that you can resolve with your private IP address from within your network, the issue must be with the port forwarding configuration. We presume that neither your public IP nor any domain name will resolve, correct?
Of course, when you use the IP instead of a domain name, only either the default domain, if there is one, or the first virtual domain will be shown. You won't be able to see other virtual domains without using a domain name. You can test this by adding your domains to the hosts file on your windows 10 PC.
Use notepad to edit C:\Windows\System32\drivers\etc\hosts and add lines at the end:
BUT, then your PC will always work, and you won't be able to use it to test/resolve the forwarding issue, so you probably won't want to leave those entries in place
As AwesomeMachine says, show us what you did to implement the port forwarding.
My production web server hosts ~70 domains all resolving to a single IP.
As you said and that does work when I type the domain url's in the browser.
Thank you again for your help.
I posted the url's here so you can get the full idea of what is going on.
My public ip is 73.1.1.1 and they resolve to this IP when I do nslookup.I don't know where the problem is since this works when I edit the hosts file, it makes me think it is a DNS problem somewhere, or perhaps my ISP (Comcast) blocks this as this is a home internet account. I do not know. But because I can view these url's with the hosts file edited, I feel the Ubuntu machine is working as it should.
Any help will be greatly appreciated. Mike
Last edited by sternfanatic; 02-15-2018 at 05:37 PM.
Thank you for your help. Somehow, apparently I did fix it. I did find a typo error in my hostfile, which I fixed after your first post. I do know to block ports 21 and 23 I opened them during testing. Also My public IP info. Thanks again. I really appreciate your help here.
Thank you for your help. Somehow, apparently I did fix it. I did find a typo error in my hostfile, which I fixed after your first post. I do know to block ports 21 and 23 I opened them during testing. Also My public IP info. Thanks again. I really appreciate your help here.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.