Access Apache site on LAN

Sigma721

Well-Known Member
Joined
Sep 14, 2011
Messages
122
Reaction score
0
Hi everyone

So after a lot of reading and learning, I have my SSL Apache server up and running. My only problem is that if a computer on the same LAN goes the either the url for the site hosted on the Apache server or the Apache server's LAN ip, the page does not load.

Anyone know why this is?

Thanks in advance
 
Try putting the IP address of the machine serving the site into your browser.
It should be listening on port 80 by default so that should work. Your SSL will be serving on 443.
Make sure ports 80 and 443 are open on the firewall of the machine serving the site.
 
Thanks for the replies.

If I put the IP address in a pc on the LAN, it redirects to tries to load the https url. If I use netstat -tuplen to check the ports on Centos, both 80 and 443 are open, Local address show :::80 and :::443 and foreign address shows :::*.

Anything else I can check?
 
Is the site populated in your local DNS server? To point to it's local address I mean.

I would imagine it's trying to get to the WAN IP address which is naturally going to fail if the site sits internally.

Try testing by editing your hosts file.
 
Thanks for the replies.

If I put the IP address in a pc on the LAN, it redirects to tries to load the https url. If I use netstat -tuplen to check the ports on Centos, both 80 and 443 are open, Local address show :::80 and :::443 and foreign address shows :::*.

Anything else I can check?

Doesn't netstat just tell you that the Apache server is listening on 80 and 443? The firewall could still be blocking those ports. On my Centos box, I opened the ports I needed using the GUI firewall tool. Most everything was locked down by default.
 
I checked that the firewall is allowing both port 80 and port 443 through. Even if I try to load the page on the Centos machine, it gets an error(using both the URL and the LAN IP). Any suggestions?
 
if its a centos machine then do an: iptables -L
that will show what is and isnt being blocked.
Also run: tail -f /var/log/messages then from another session restart apache and try to connect to the site.
that tail should show you an error related to the problem.
 
Also come to think of it, your cert would be self signed Im sure, so check your browser to make sure it isnt blocking self signed certs.
 
Can you post your apache sites-enabled file? Could be that it's not expecting to be contacted on its IP address, rather expecting a domain name
 
Top
Sign up to the MyBroadband newsletter
X