2013-06-24 129 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.一切都与路由器有关。