How can I setup a virtual server on a different port so it can be viewed without a url

I’m not sure how you do it with Apache but you can do it with NGINX quite easily. See config code here as an example of how to do it. Mind you that’s SSL, so you may want something like:

   server_name example.org www.example.org;
   listen 93.184.216.34:8080;
   listen [2606:2800:220:1:248:1893:25c8:1946]:8080;
   listen 93.184.216.34:44300 ssl;
   listen [2606:2800:220:1:248:1893:25c8:1946]:44300 ssl;
   ssl_certificate /home/example/ssl.combined;
   ssl_certificate_key /home/example/ssl.key;
   root /home/example/public_html;

And then just iterate the port numbers. (8081 8082, 44301, 44302 etc). You don’t need to worry about the server_name not resolving, if you only have one webhost on the port the IP will go to that server for you. Obviously you’ll need to use self-signed SSL for HTTPS.

1 Like