nginx multiple domain point to same location
Yes, it's possible.
You can use "*", even you can use regular expression, a good solution for you could be:
server {
listen 80
server_name ~^example.com|example.co.uk|example.net$;
root /var/www/example.com/html
}
I need do something like a peopleusername.wix.com and I just should do:
server {
listen 80
server_name *.wix.com;
root /var/www/example.com/html
}
and from the code I just can access to the full url from the request and extract the username from the url and fetch the user ID from the database and put all user configuration and data from the user togeter to show the theme and colors that the users configure
There's no magic:
- http://nginx.org/en/docs/http/request_processing.html
- http://nginx.org/en/docs/http/server_names.html