I have setup a wildcard subdomain server(many subdomains) server { listen 80; server_name ~(?<subdomain>.*).localhost; ... ... } I want to make the subdomain apart of the query in the backend when we visit http://clothes.localhost/ backend query http://localhost/script.php?sd=clothes or we visit http://jackets.localhost/large/blue/ backend query http://localby NginxNewComer - Nginx Mailing List - English
Hello I believe I have managed to partially solve this(within my own knowledge of things) Firstly, Within your hosts file(independant of nginx) you must setup some subdomains, For windows it will originally look something like this Before 127.0.0.1 localhost After 127.0.0.1 localhost test.localhost example.localhost Now in your nginx.conf file, Setup your server block liby NginxNewComer - How to...
Hello I wish to have a configuration which allows for subdomains to be accessable without actual real sub folders created. Example jack.localhost, this would be the direct url, but nginx would parse it as localhost/?query=jack steven.localhost -> localhost/?query=steven. I have tried loads of rewrite rules, via server_name, and location, but none seem to work. Im sure I must be miby NginxNewComer - How to...