2013-06-24 115 views
0

我有一個工作的Apache2服務器。運行沒有問題。然後我感動了。Apache2端口更改錯誤

我的新ISP阻止端口80,所以我需要改變它。 有些事情出錯了,我一直在努力幾個小時沒有運氣。

知道我只是想達到本地主機,127.0.0.1。 嘗試使用此設置訪問它們將返回「無法連接」。

這是我ports.conf

# If you just change the port or add more ports here, you will likely also 
# have to change the VirtualHost statement in 
# /etc/apache2/sites-enabled/000-default 
# This is also true if you have upgraded from before 2.2.9-3 (i.e. from 
# Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and 
# README.Debian.gz 

NameVirtualHost *:8080 
Listen 8080 


<IfModule mod_ssl.c> 
    # If you add NameVirtualHost *:443 here, you will also have to change 
    # the VirtualHost statement in /etc/apache2/sites-available/default-ssl 
    # to <VirtualHost *:443> 
    # Server Name Indication for SSL named virtual hosts is currently not 
    # supported by MSIE on Windows XP. 
    Listen 443 
</IfModule> 

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

這是我啓用的站點 -/000-默認

<VirtualHost *:8080> 
    ServerAdmin [email protected] 

    DocumentRoot /var/www 
    <Directory /> 
     Options FollowSymLinks 
     AllowOverride None 
    </Directory> 
    <Directory /var/www> 
     Options Indexes FollowSymLinks MultiViews 
     AllowOverride None 
     Order allow,deny 
     allow from all 
    </Directory> 

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ 
    <Directory "/usr/lib/cgi-bin"> 
     AllowOverride None 
     Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch 
     Order allow,deny 
     Allow from all 
    </Directory> 

    ErrorLog ${APACHE_LOG_DIR}/error.log 

    # Possible values include: debug, info, notice, warn, error, crit, 
    # alert, emerg. 
    LogLevel warn 

    CustomLog ${APACHE_LOG_DIR}/access.log combined 
</VirtualHost> 

我已經運行sudo的服務的Apache2重啓。 我做了一個sudo服務apache2重裝也。 我已經做sudo ufw允許8080.

如果我恢復到端口80,一切都很好。

我有mod_security啓用,如果這與它有關。

謝謝你的幫助。 Jon

+0

解決。我有一個新的路由器,這需要你爲虛擬服務器設置設置。那和每一個工作。我的ISP甚至沒有阻止端口80.一切都與路由器有關。 –

回答

0

已解決。 我有一個新的路由器,這需要你設置虛擬服務器的設置。 這是否和每一個工作。

我的ISP甚至沒有阻止端口80.一切都與路由器有關。