How to get Apache Server to display a test page

I am trying to configure Apache Server on a CentOS 5.9 machine, but I don’t see the Apache test page when I visit my computers IP address on port 80 in my browser. Apache / httpd comes with the CentOS package, and I already provided the httpd and NameVirtualHost *:80 services NameVirtualHost *:80 was uncommented in /etc/httpd/conf/httpd.conf , the rest is httpd.conf, which is installed by default. There are no errors in the httpd log, and the service restarts. What am I doing wrong? Thanks.

+4
source share
1 answer

To check if apache serves the default page, point your browser to http://localhost . If you do not have a GUI, you can access your server using curl localhost , which will print the default HTML code for your page on your stdout.

If you are trying to access your server from a remote computer, you should check if a working firewall exists and if port 80 iptables -vnL . If not, open it with iptables -A INPUT -p TCP -m state --state NEW -j ACCEPT

+7
source

Source: https://habr.com/ru/post/1487344/


All Articles