I'm running a website with Nginx which I would like to be accessible by Tor and by clearnet. Currently it's only reachable by clearnet, e.g. www.example.com.
Of course people just can go to www.example.com through Tor browser, but I want to have a .onion address too for the same website.
I want the website and content to be accessible by www.example.com/ and xyzsfexample.onion/. So they see content from /var/www/www.example.com/web/index.php as xyzsfexample.onion/index.php ; IF they browse on xyzsfexample.onion ; IF they browse on example.com they should see example.com/index.php
How do I set this up and how must Nginx be configured to do both?