将默认端口从 80 更改为 8099 后,Apache2 无法正常工作
我做了以下事情:
在/etc/apache2/ports.conf 中,将端口更改为:
Listen 8099
在/etc/apache2/sites-enabled/000-default.conf 中,这样做:
<VirtualHost *:8099>
然后:
sudo /etc/init.d/apache2 reload
sudo /etc/init.d/apache2 restart
我尝试使用以下命令检查打开的端口:sudo netstat -plunt,结果如下:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 1179/mysqld
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1005/sshd
tcp6 0 0 :::8099 :::* LISTEN 6337/apache2
tcp6 0 0 :::22 :::* LISTEN 1005/sshd
udp 0 0 0.0.0.0:14717 0.0.0.0:* 641/dhclient
udp 0 0 0.0.0.0:68 0.0.0.0:* 641/dhclient
udp6 0 0 :::48002 :::* 641/dhclient
我在这里遗漏了什么吗?谢谢
最佳答案
关于linux - 更改默认端口后 Apache2 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35373707/