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 like this.
server {
listen 80;
server_name ~(?<subdomain>.*).localhost;
You will now be able to access either localhost,test.localhost, or example.localhost, if you need the subdomain name in the url, you can access it via $subdomain.
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 like this.
server {
listen 80;
server_name ~(?<subdomain>.*).localhost;
You will now be able to access either localhost,test.localhost, or example.localhost, if you need the subdomain name in the url, you can access it via $subdomain.