我在更改Apache2的默认端口进行侦听时发生了一些问题,但它不起作用。在Debian系统上更改Apache2端口
我编辑我ports.conf文件看起来像这样:
# Edited:
NameVirtualHost *:9000
Listen 9000
# Kept the same:
<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>
然后调整好自己的虚拟主机文件(它符号链接到网站启用 - ):
<VirtualHost *:9000>
ServerAdmin [email protected]
ServerName www.mysite.co.uk
ServerAlias mysite.co.uk
# Directory Root
DocumentRoot /home/mysite/www
# Logfiles
ErrorLog /home/mysite/log/error.log
CustomLog /home/mysite/log/www.log "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""
</VirtualHost>
对于记录,如果我将所有端口引用(9000)替换为80,则该站点将再次运行。
在DocumentRoot是一个WordPress站点。有可能WordPress可以重写端口号吗?