2015-03-31 113 views
-1

我對此很新,所以我可能錯過了一些非常明顯的東西,但無法使用我的外部IP連接到我的服務器。內部一切都像夢一樣(10.0.0.28/redmine),但是當我嘗試使用外部IP連接時,請求會超時。我轉發了我的ssh端口和端口80,如下所示,但這並沒有解決問題。 我的港口現在顯示爲與www.portchecktool.com打開。Ubuntu服務器(apache)不會對外部請求作出響應

SSH在內部工作正常,但是當我發出這裏顯示的命令時,它說遠程主機關閉了連接。

ssh {my external ip} -pxxxx -i /home/millerir/.ssh/id_rsa -l imiller 

同樣,當我瀏覽到我的{} IP /管理平臺或{我的IP}或{} my_ip:80或我的DDNS服務的地址,我得到的連接復位,同時試圖從錯誤我的瀏覽器進行連接。

我沒有檢查服務器是否正在監聽端口80和我的ssh端口,如下所示。

[email protected]:/etc/apache2/sites-available$ sudo netstat -tulpn | grep LISTEN 
tcp  0  0 0.0.0.0:xxxx   0.0.0.0:*    LISTEN  779/sshd 
tcp  0  0 127.0.0.1:57384   0.0.0.0:*    LISTEN  1192/redmine 
tcp  0  0 127.0.0.1:3306   0.0.0.0:*    LISTEN  862/mysqld 
tcp6  0  0 :::xxxx     :::*     LISTEN  779/sshd 
tcp6  0  0 :::80     :::*     LISTEN  923/apache2 

如果任何人都可以幫助我,將不勝感激。我卡住了,有點無知。

redmine.conf

<VirtualHost *:80> 
     # The ServerName directive sets the request scheme, hostname and port that 
     # the server uses to identify itself. This is used when creating 
     # redirection URLs. In the context of virtual hosts, the ServerName 
     # specifies what hostname must appear in the request's Host: header to 
     # match this virtual host. For the default virtual host (this file) this 
     # value is not decisive as it is used as a last resort host regardless. 
     # However, you must set it for any further virtual host explicitly. 
     #ServerName www.example.com 

     ServerAdmin [email protected] 
     #DocumentRoot /var/www/html 

     # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, 
     # error, crit, alert, emerg. 
     # It is also possible to configure the loglevel for particular 
     # modules, e.g. 
     #LogLevel info ssl:warn 

     ErrorLog ${APACHE_LOG_DIR}/error.log 
     CustomLog ${APACHE_LOG_DIR}/access.log combined 

     # For most configuration files from conf-available/, which are 
     # enabled or disabled at a global level, it is possible to 
     # include a line for only one particular virtual host. For example the 
     # following line enables the CGI configuration for this host only 
     # after it has been globally disabled with "a2disconf". 
     #Include conf-available/serve-cgi-bin.conf 

     DocumentRoot /var/www 
     <Directory /var/www/redmine> 
       RailsBaseURI /redmine 
       PassengerResolveSymLinksInDocumentRoot on 
     </Directory> 
</VirtualHost> 

的http.conf

<Listen 80 

<IfModule ssl_module> 
     Listen 443 
</IfModule> 

<IfModule mod_gnutls.c> 
     Listen 443 
</IfModule> 
+0

顯然,我沒有足夠的聲譽張貼圖片的又一:(但我做了我最好的,包括文本或我的端口轉發設置。 服務名稱\t類型\t起始端口\t結束端口\t服務器IPv4的IPv6服務器\t活動\t Web服務器\t TCP/UDP 10.0.0.28 \t \t ServerSSH \t TCP/UDP \t XX XX \t 10.0 \t .0.28 – Ian 2015-03-31 23:46:44

回答

0

所以我周圍挖一些路由器不喜歡你 「中出來,回到」 走出後想通了。我嘗試使用手機上的數據連接到我的服務器,現在它可以正常工作。

相關問題