I have two files that are loaded by 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>
I know that both files are loaded and parsed by Apache without errors. When I visit the IP address of my VPS with :3333 I'm getting
Oops! Google Chrome could not connect to 1.2.3.4:3333
I'm getting no errors from Apache or anything, so I suppose that configuration is erroneous. I'm hoping to be able to visit 1.2.3.4:3333 and have /usr/share/roundcube/index.php
be opened in my browser.
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
I have added Listen 3333
right below the NameVirtualHost
line. It didn't have any effect however. Does order matter when it comes to this? Must for instance NameVirtualHost
come before or after <VirtualHost>
? Can the same instance of Apache listen to port 80 and 3333 at the same time?
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
Make sure you have set the Listen directive correctly in your Apache configuration.
Listen 3333
Relevant documentation