http请求失败到同一网络的其他计算机

i am new in linux networking and apache server configuration.

someone gave me two linux server under same vpn. Redhat is installed on them.

those server has both internal ip and external ip. i mean external ip are forwarded to those internal ips.

i have installed apache on those server and also uploaded php websites on them. so i can access website installed on those server from internet(from outside of the vpn) using their external ip.

both server has hostname(i mean i get a local domain name by the hostname command)

and also from ssh i can ping one another by both external ip and internal ip and that hostname.

but from the php end of the installed website i can't access the website of one server from another server.

i have tried with file_get_contents and curl to access websites. i have tried with both external ip and internal ip and hostname but all fail.

i checked the both file_get_contents and curl and found those are working with other public websites like google dot com etc.

but its not working only when i am trying access from one server to another on that vpn(i mean same network)

can you please tell me what is the problem?

is it apache configuration problem or vpn setup or ip forwarding problem?

please help.

Regards Al Amin

===

edit

sudo netstat -tlpen :

Proto Recv-Q Send-Q Local Address               Foreign Address             State       User       Inode      PID/Program name
tcp        0      0 127.0.0.1:199               0.0.0.0:*                   LISTEN      0          615968     574/snmpd
tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN      27         1948058    3881/mysqld
tcp        0      0 127.0.0.1:53                0.0.0.0:*                   LISTEN      25         3052927    6927/named
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      0          616002     586/sshd
tcp        0      0 127.0.0.1:953               0.0.0.0:*                   LISTEN      25         3052932    6927/named
tcp        0      0 :::80                       :::*                        LISTEN      0          3149386    7369/httpd
tcp        0      0 ::1:53                      :::*                        LISTEN      25         3052929    6927/named
tcp        0      0 :::22                       :::*                        LISTEN      0          616004     586/sshd
tcp        0      0 ::1:953                     :::*                        LISTEN      25         3052933    6927/named

finally i found the problem and solved. i just placed Allow from all in tag in httpd.conf file and it worked. its my mistake. i was thinking if Deny from all not present in tag then by default it will allow all but i was wrong. i had to put the Allow from all in tag in httpd.conf file.

It is probably a firewall issue. You need to disable the firewall on the server you are trying to connect to. If that fixes it, then reconfigure the firewall to allow VPN connections between the servers.