我在更改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可以重寫端口號嗎?