Welcome! Log In Create A New Profile

Advanced

How to Support multiple Virtual Servers WITHOUT Domain Names

Posted by tcb 
tcb
How to Support multiple Virtual Servers WITHOUT Domain Names
May 31, 2020 01:42PM
Don't even know if this is possible, but if it is, would like to learn how I can use NGINX running on an arbitrary Debian 10.4-based VPS with a fixed IP to support three or four different websites under development.

I think this should be possible by assigning different HTTP/HTTPS ports per site, but perhaps there are other ways.

Alternatively, its been suggested to me that I could create a local hosts file with containing multiple domain names that when connecting to the VPS's IP could be distinguished by Nginx.

Any/All suggestions welcome!
Re: How to Support multiple Virtual Servers WITHOUT Domain Names
June 05, 2020 09:11AM
not really an nginx question, it's more about name resolution.

On the VPS, there are two things I'd suggest. (1) use Name Service Switch to tell the VPS to first look in the hosts file. or (2) use DNSmasq to do the same. DNSmasq is useful, you can make aliases for domains ie test1.do.main test.do.main etc

Then you need to the client to send HTP packets that way (1) route them using a VPN so the addresses in DNSmasq or hosts are VPN addresses or (2) run a SOCKS SSH tunnel to the VPS and switch with a manual config, a PAC file or an extension like SwitchyOmega on Chrome.

That's just how I do it, raw suggestions without blow-by-blow configs

Personally on my desktop I have Chrome with SwitchyOmega running over an SSH tunnel to a VPS. But I use VPN sometimes as well.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 69
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready