I am trying to achieve URL like GitHub Pages. whenever user will visit username.example.com
internally it will respond from localhost:80/username
I am giving some example So that it will make the problem more understandable. what I am trying to achieve it
whenever user will visit
user1.example.com -> localhost/user1
user2.example.com -> localhost/user2
user1.example.com/about -> localhost/user1/about
user2.example.com/about/somemore -> localhost/user2/about/somemore
I hope my problem is clear to you all.
I am using nginx and I had setup wildcard for the subdomain.
Currently For any subdomain my website is showing index.html page