Skip to content

Instantly share code, notes, and snippets.

@cryptrz
Last active January 23, 2023 08:19
Show Gist options
  • Save cryptrz/2a8144ab3dc002b2b3d50759cd0aee50 to your computer and use it in GitHub Desktop.
Save cryptrz/2a8144ab3dc002b2b3d50759cd0aee50 to your computer and use it in GitHub Desktop.
Build a Tor website on Fedora Server
Install NGINX, PHP, Tor and Vim:
sudo dnf install nginx php tor vim
Set Tor:
sudo vim /etc/tor/torrc
Uncomment this 2 lines:
HiddenServiceDir /var/lib/tor/hidden_service/
HiddenServicePort 80 127.0.0.1:80
sudo systemctl enable tor
sudo systemctl start tor
sudo systemctl status tor
Set NGINX:
sudo systemctl enable nginx
sudo systemctl start nginx
sudo systemctl status nginx
cd /usr/share/nginx/html/
sudo rm index.html
sudo vim index.php
Add the following line, and save it typing ":wq!":
<?php phpinfo(); ?>
Check the website URL and copy/paste it on Tor Browser to test the website:
sudo cat /var/lib/tor/hidden_service/hostname
Finally, edit the index.php file as you wish and enjoy this new website:
sudo vim index.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment