我有两个由apache2.conf加载的文件:
roundcube.conf:
NameVirtualHost *:3333
roundcube.vhost:
<VirtualHost *:3333> DocumentRoot /usr/share/roundcube DirectoryIndex index.php <Directory /usr/share/roundcube> Order Allow,Deny Allow from all </Directory> </VirtualHost>
我知道这两个文件都是由Apache加载和parsing的,没有错误。 当我访问我的VPS的IP地址:3333我越来越
哎呀! Google Chrome无法连接到1.2.3.4:3333
我没有从Apache或任何错误,所以我想configuration是错误的。 我希望能够访问1.2.3.4:3333,并有/usr/share/roundcube/index.php在我的浏览器中打开。
iptables的
root@myservername:~# sudo iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination fail2ban-ssh tcp -- anywhere anywhere multiport dports ssh Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination Chain fail2ban-ssh (1 references) target prot opt source destination RETURN all -- anywhere anywhere
我在NameVirtualHost行下面添加了Listen 3333 。 但是没有任何效果。 当涉及到这个时,订单是否重要? 必须例如NameVirtualHost之前或之后<VirtualHost> ? Apache的同一个实例可以同时监听端口80和3333吗?
用netstat
root@myservername:/etc/apache2/sites-enabled# netstat -tulpn | grep -e ':3333' -e ':80' -e ':8080' -e ':443' tcp 0 0 0.0.0.0:3333 0.0.0.0:* LISTEN 7690/apache2 tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 7690/apache2 tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 7690/apache2 tcp 0 0 0.0.0.0:8081 0.0.0.0:* LISTEN 7690/apache2 tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 7690/apache2
确保在Apacheconfiguration中正确设置了Listen指令。
Listen 3333
相关文件