I need to serve a large number of websites on the same machine. I'll need to be able to add and remove websites dynamically.
Internally, the web server needs to think that the request arrived from a vhost.
Is it possible to use nginx in the front that will handle requests in the form: example.com/vhost1/some/path and rewrite them to: vhost1.example.com/some/path
Can I do that without configuring DNS for vhost1.example.com?
Do I need to add vhost1.example.com to the hosts name on the machine?