0

so here is the setup server 1 receives all incoming web users as it's the one that port 80 is forwarded too (apache).

servers 2-4, have various other services, local ip addresses 192.168.0.x, and I'd like to be able to point sub domains to each of them.

so far all i can work out what I need to do is create the sub domains as entries as virtual hosts and then somehow get those rather than pointing to a directory on server1 point them towards the various other servers on the local network, however I can't work out what exactly I need to enter to achieve this.

Any help would be much appreciated.

1 Answer 1

0

Something like this:

<VirtualHost *:80>
  ServerName subdomain.example.com

  ErrorLog    logs/subdomain.example.com_error_log
  CustomLog   logs/subdomain.example.com_log common

  ProxyPass           /     http://192.168.0.x:9090/
  ProxyPassReverse    /     http://192.168.0.x:9090/
</VirtualHost>
2
  • 1
    Thanks for the reply, when i attempt to restart apache2 it gives me the error, "Job for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details." Jul 15, 2016 at 16:30
  • 1
    inside which it states 'Invalid command 'ProxyPass', perhaps misspelled or defined by a module not included in the server configuration' Jul 15, 2016 at 16:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.