I programmed on my PC a website in php using xampp and mysql server, but how do I send these files contained in my folder, which is located at: (ex: htdocs/my finished site), to the tor network?
You should point the address:port of you webserver to Tor.
First, create a folder in which the files for the .onion domain will be put on:
sudo mkdir /var/lib/tor/<site_name>
Change the permissions:
sudo chmod 0700 /var/lib/tor/
Change the folder ownership to user running Tor (in Debian is debian-tor):
sudo chown -R debian-tor:debian-tor /var/lib/tor/
Edit your /etc/tor/torrc file and insert these lines
HiddenServiceDir /var/lib/tor/<site_name> HiddenServicePort 80 <webserver_address>:<port>
Replace <webserver_address>: with the address:port of the webserver, for example 127.0.0.1:8080
sudo systemctl restart tor.service
And finally pick up the address of your hidden site:
sudo cat /var/lib/tor/<site_name>/hostname
(Sorry if my English is bad).