I have set up an Abyss web server as a little experiment, and I want to know if it is possible to assign subdomains to different ports on the machine the web server is running on.

I have a couple web UIs that I'd like to assign subdomains:

  1. becomes example.com/webui1/
  2. becomes example.com/webui2/

The webUIs are available by accessing their ports via example.com:8000.

I have tried using a reverse proxy, but it seems that this is only usable on one internal IP at a time.

What other options do I have?

Answer is good, but my current set up doesn't meet the requirements. Abyss Web Server X2 is required to use Virtual Hosts with Abyss.

1 Answer 1


You need to make a separate VirtualHost for each port, like so:

#assuming you have this in your config
NameVirtualHost *:8000
NameVirtualHost *:8001
NameVirtualHost *:8002
NameVirtualHost *:8003 # (...)
Listen 8000
Listen 8001
Listen 8002
Listen 8003 # (...)

Then each VirtualHost looks like this:

<VirtualHost *:8000>
        ServerName localhost
        DocumentRoot /path/to/www/dir/1
<VirtualHost *:8001>
        ServerName localhost
        DocumentRoot /path/to/www/dir/2
<VirtualHost *:8002>
        ServerName localhost
        DocumentRoot /path/to/www/dir/3
<VirtualHost *:8003>
        ServerName localhost
        DocumentRoot /path/to/www/dir/4

And for each of the /path/to/www/dir/(1,2,3,4...) directories, you can use PHP for example, to redirect the user:

header('Location: http://example.com/webui2');

Or instead use mod_rewrite to do that within the Apache configuration.

But this setup is incredibly inefficient, a hassle to maintain, and not worth probably what you're intending to do.

  • I see, as I'm using the free Abyss X1 web server I don't think Virtual Hosts is available to me. Unless I'm missing something extremely obvious. Oct 1, 2012 at 7:29
  • @MichaelFrank - Well, you would simply upgrade to the version 2, which does support VirtualHosts (aprelium.com/abyssws/articles/x2-hosts.html) or install Apache instead. With your current setup, it is impossible.
    – ionFish
    Oct 1, 2012 at 7:36
  • As it's a small home project I don't really want to pay for an upgrade. I have tried installing Apache, but I'm having issue getting it set up on my WHS 2011. Oct 1, 2012 at 8:17
  • Okay, I have got Apache set up and running but I don't see how I can point the DocumentRoot to the webUI of a running program. Oct 2, 2012 at 23:21

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.