I would like to understand how websites on the dark web hosted?
What software is used for hosting?
How is it different from hosting a normal website?
Tor Stack Exchange is a question and answer site for researchers, developers, and users of Tor. It only takes a minute to sign up.
Sign up to join this communityIt is the same as hosting a regular website, but it is routed through and only reachable through the tor network. You setup a website using the ngnix (reccomended for security) web server. You set it up to only listen to your localhost (127.0.0.1) so it is not reachable by the regular web. You then setup a tor server and configure it to generate a .onion address and port forward all traffic coming to it to the ngnix server.
So someone connects to your onion address hejfhfieh.onion on port 80. It travels through the tor network to your tor server. The tor server then port forwards its traffic from hejfhfieh.onion:80 to 127.0.0.1:4732.
Of course those are just examples, your onion address will be different, and you can use any ports you want.
Hope that helped you understand it better. There are several guides you can follow to setup your own hidden service.