2014-01-15 137 views
0

我在puppy linux中設置apache,並可以在localhost中看到文件。但是,當我打開port80並嘗試從iphone連接apache但失敗時。我可以看到只是一個白頁。也許它沒有404,因爲它沒有顯示404錯誤。(在我打開端口之前,我看到了404)。無法遠程連接到Apache服務器

我配置了apache.conf來允許所有。

訪問日誌和錯誤日誌什麼也沒有顯示。

這是iptables的-L

Chain INPUT (policy DROP) 
target  prot opt source    destination   
ACCEPT  all -- anywhere    anywhere   state RELATED,ESTABLISHED 
ACCEPT  tcp -- anywhere    anywhere   state NEW tcp dpt:ftp 
ACCEPT  tcp -- anywhere    anywhere   state NEW tcp dpt:ssh 
ACCEPT  tcp -- anywhere    anywhere   state NEW tcp dpt:smtp 
ACCEPT  tcp -- anywhere    anywhere   state NEW tcp dpt:domain 
ACCEPT  udp -- anywhere    anywhere   state NEW udp dpt:domain 
ACCEPT  tcp -- anywhere    anywhere   state NEW tcp dpt:finger 
ACCEPT  tcp -- anywhere    anywhere   state NEW tcp dpt:www 
ACCEPT  tcp -- anywhere    anywhere   state NEW tcp dpt:pop3 
ACCEPT  tcp -- anywhere    anywhere   state NEW tcp dpt:auth 
ACCEPT  tcp -- anywhere    anywhere   state NEW tcp dpt:imap2 
ACCEPT  tcp -- anywhere    anywhere   state NEW tcp dpt:443 
ACCEPT  udp -- anywhere    anywhere   state NEW udp dpt:syslog 
ACCEPT  tcp -- anywhere    anywhere   state NEW tcp dpt:printer 
ACCEPT  tcp -- anywhere    anywhere   state NEW tcp dpt:993 
ACCEPT  tcp -- anywhere    anywhere   state NEW tcp dpt:995 
ACCEPT  tcp -- anywhere    anywhere   state NEW tcp dpt:www 
ACCEPT  udp -- anywhere    anywhere   state NEW udp dpt:www 
A CCEPT  all -- anywhere    anywhere   state NEW 
TRUSTED all -- anywhere    anywhere   state NEW 

Chain FORWARD (policy DROP) 
target  prot opt source    destination   

Chain OUTPUT (policy ACCEPT) 
target  prot opt source    destination   
DROP  icmp -- anywhere    anywhere   state INVALID 

Chain TRUSTED (1 references) 
target  prot opt source    destination   
ACCEPT  icmp -- anywhere    anywhere   icmp echo-request 
DROP  icmp -- anywhere    anywhere    
REJECT  all -- anywhere    anywhere   reject-with icmp-port-   unreachable 

的Netstat

tcp  0  0 192.168.100.100:80  0.0.0.0:*    LISTEN  
tcp  0  0 127.0.0.1:631   0.0.0.0:*    LISTEN 

我如何解決這個問題?

回答

0

TCP 0 0 192.168.100.100:80

的問題就在這裏。服務器正在監聽特定的本地IP地址,而不是0.0.0.0。

+0

感謝您的回覆。當我在rooter中打開80端口時,我使用該ip,所以我認爲我必須使用它。所以,我應該使用哪個ip?你可以告訴我嗎? – user3119018

+0

我建議你再讀一遍我的答案。我已經回答了。 – EJP

+0

我在ports.conf中寫了「Listen 0.0.0.0.:80」,但它沒有工作.404 error.netstat顯示「tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 9608/apache2 「抱歉再次打擾。我該如何解決這個問題? – user3119018