doulin6448 2013-11-16 11:58
浏览 38
已采纳

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
  • 写回答

2条回答 默认 最新

  • doujiao1948 2013-11-18 13:27
    关注

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥50 导入文件到网吧的电脑并且在重启之后不会被恢复
  • ¥15 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。
  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能