0

httpd.conf set up as follows on an apache server:

Listen 80
Listen 78

ServerName 162.13.46.59
DocumentRoot /var/www/ftl-media

NameVirtualHost 162.13.46.59:78

<VirtualHost 162.13.46.59:78>
     ServerName 162.13.46.59
     DocumentRoot /var/www/vapetropolis
</VirtualHost>

However, requests to port 78 aren't working. "Oops! Google Chrome could not connect to 162.13.46.59:78".

What's wrong with this config?

Chilledrat
  • 2,593
  • 3
  • 28
  • 38
valen
  • 807
  • 1
  • 16
  • 43
  • 1
    Do you have a firewall blocking port 78? It's not a normal HTTP port and so may be blocked by default. – Isaac Dontje Lindell Jul 22 '13 at 16:20
  • Nope, the port isn't blocked. Set this iptables rule, and still not working: iptables -A INPUT -i eth0 -p tcp --sport 78 -m state --state ESTABLISHED -j ACCEPT – valen Jul 22 '13 at 18:58
  • I don't have an Apache instance to test this with right now, but what happens if you remove the NameVirtualHost line? I'm just basing the thought on the Apache docs, which doesn't have that line in the "Running different sites on different ports" section: http://httpd.apache.org/docs/current/vhosts/examples.html – Isaac Dontje Lindell Jul 22 '13 at 20:37

1 Answers1

0

Generally speaking, port numbers less than 1024 require the process to run as root. This isn't so much of a firewall issue as a security policy -- those ports are reserved for system processes.

If you want to use port 78, some configuration will be required.

Maybe this question will help?

Is there a way for non-root processes to bind to "privileged" ports on Linux?

Community
  • 1
  • 1
Nathan
  • 191
  • 3
  • 17