Skip to content

Instantly share code, notes, and snippets.

@boris
Created November 15, 2021 00:10
Show Gist options
  • Save boris/122db90f08c5b09aa97232dca8366d32 to your computer and use it in GitHub Desktop.
Save boris/122db90f08c5b09aa97232dca8366d32 to your computer and use it in GitHub Desktop.
tor_install.txt
- Install packages:
sudo apt install tor nginx
- Create a minimal config file for nginx on /etc/nginx/sites-enabled/tor:
server {
listen 127.0.0.1:80 default_server;
root /var/www/html;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
server_name _;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}
}
- Edit /etc/tor/torrc adding (at least) the following content:
HiddenServiceDir /var/lib/tor/hidden_service/
HiddenServicePort 80 127.0.0.1:80
- Restart the srevices:
sudo systemctl restart nginx
sudo systemctl restart tor
- Get tor's hostname:
sudo cat /var/lib/tor/hidden_service/hostname
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment