Last active
January 6, 2025 18:45
-
-
Save wwwqr-000/29c02173df4721d6cc0ab6c0bcba99f8 to your computer and use it in GitHub Desktop.
tor website with apache2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo -s | |
| apt-get update | |
| apt-get install apache2 | |
| apt-get install tor | |
| nano /etc/apache2/sites-available/tor_website.conf | |
| #tor_website.conf file contents: | |
| #begin of file | |
| <VirtualHost *:8080> | |
| ServerAdmin admin@example.com | |
| ServerName tor-website | |
| DocumentRoot /tor_website/public | |
| <Directory /tor_website/public> | |
| Options Indexes FollowSymLinks | |
| AllowOverride All | |
| Require all granted | |
| </Directory> | |
| ErrorLog /tor_website/logs/error.log | |
| CustomLog /tor_website/logs/access.log combined | |
| </VirtualHost> | |
| #end of file | |
| a2ensite tor_website | |
| systemctl reload apache2 | |
| nano /etc/tor/torrc | |
| #add the following lines: | |
| #If you want to add a hidden directory, use the following commands: | |
| # mkdir hidden2 | |
| # chown debian-tor:debian-tor hidden2 | |
| # chmod 700 hidden2 | |
| HiddenServiceDir /var/lib/tor/hidden_service/ | |
| HiddenServicePort 80 127.0.0.1:8080 | |
| #end of lines | |
| systemctl restart tor | |
| cat /var/lib/tor/hidden_service/hostname | |
| #This is your onion address | |
| nano /etc/apache2/conf-available/security.conf | |
| #replace the following lines or add them: | |
| ServerTokens Prod | |
| ServerSignature Off | |
| #end of lines | |
| nano /etc/apache2/ports.conf | |
| #Add the port in this file, in this case, add this line: | |
| #Listen: 8080 | |
| systemctl restart apache2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment