Score:0

Apache not responding due to port mapping

cn flag
[centos@staging03 ~]$ sudo netstat -tulpn | grep LISTEN
tcp        0      0 127.0.0.2:80                0.0.0.0:*                   LISTEN      18336/varnishd      
tcp        0      0 127.0.0.1:80                0.0.0.0:*                   LISTEN      15636/fcgi-         
tcp        0      0 172.31.22.60:80             0.0.0.0:*                   LISTEN      1557/nginx          
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      1274/sshd           
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      1524/master         
tcp        0      0 127.0.0.1:443               0.0.0.0:*                   LISTEN      15636/fcgi-         
tcp        0      0 127.0.0.1:6082              0.0.0.0:*                   LISTEN      18335/varnishd      
tcp        0      0 127.0.0.1:11211             0.0.0.0:*                   LISTEN      1252/memcached      
tcp        0      0 127.0.0.1:6379              0.0.0.0:*                   LISTEN      1063/redis-server 1 
tcp        0      0 :::22                       :::*                        LISTEN      1274/sshd           
tcp        0      0 :::3306                     :::*                        LISTEN      1406/mysqld     

So in the above, it's the mapping of the faulty server.

[root@webdev01 ~]# sudo netstat -tulpn | grep LISTEN
tcp        0      0 127.0.0.2:80                0.0.0.0:*                   LISTEN      1679/varnishd       
tcp        0      0 172.31.23.5:80              0.0.0.0:*                   LISTEN      1644/nginx          
tcp        0      0 127.0.0.1:80                0.0.0.0:*                   LISTEN      1620/httpd          
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      1177/sshd           
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      1439/master         
tcp        0      0 172.31.23.5:443             0.0.0.0:*                   LISTEN      1644/nginx          
tcp        0      0 127.0.0.1:443               0.0.0.0:*                   LISTEN      1620/httpd          
tcp        0      0 127.0.0.1:6082              0.0.0.0:*                   LISTEN      1678/varnishd       
tcp        0      0 127.0.0.1:11211             0.0.0.0:*                   LISTEN      1155/memcached      
tcp        0      0 127.0.0.1:6379              0.0.0.0:*                   LISTEN      1072/redis-server 1 
tcp        0      0 :::22                       :::*                        LISTEN      1177/sshd           
tcp        0      0 :::3306                     :::*                        LISTEN      1315/mysqld         
[root@webdev01 ~]# 

And here's the mapping in the server it works.

# FILE: /etc/httpd/conf/httpd.conf
User apache Group apache

ServerAdmin root@localhost

UseCanonicalName Off

DocumentRoot "/var/www/html"

<Directory /> Options FollowSymLinks AllowOverride None </Directory>

<Directory "/var/www/html">

Options Indexes FollowSymLinks

AllowOverride None

Order allow,deny
Allow from all
</Directory>

This is my apache configs

The content of my http file:

<?php print_r('hello'); ?>

File permission is:

-rw-r--r-- 1 root apache 19 Nov  4 17:02 test.php

For some reason, the port 80 is mapped to fcgi instead of httpd, but looking at the configs of both server, I didn't find any difference, so I am wondering what's causing httpd to not be mapped correctly. Is there any config file I am missing somehow?

in flag
You are not looking at the complete Apache configuration. Look for the `Listen` directive.
Score:0
gu flag

The difference is fcgi is running on server 1 and not server 2.

Check your service manager.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.