简体   繁体   中英

Unable to access Apache2 HTTPD server on browser from remote machine

I have a website deployed on Apache2. The Apache2 server is setup on a VM. When I try to access the site using a browser from a remote machine (my laptop), I get a connection timed out error. When I try to access something deployed on Tomcat on the same VM it works fine. But Apache gives a problem.

Please let me know what I am missing.

Thanks.

1) check that the httpd process is running

ps -ef | grep httpd |grep -v grep

2) make sure you are broadcasting on port 80

netstat -atn |grep :80

3) verify in your conf (/etc/httpd/conf.d/*.conf) file that you are binding Apache to port 80

<virtualhost *:80>

or

<virtualhost xxx.xxx.xxx.xxx:80>

Your Tomcat process may be bound to port 80 and the socket is not available.

on centos run this commands:

  1. iptables -I INPUT 4 -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT

  2. /etc/init.d/iptables save

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM