[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?