Static Website as Tor Hidden Service on Raspberry Pi: Difference between revisions
Jump to navigation
Jump to search
(Created page with "blablabla == Local HTTP server == * Install nginx on the RPi sudo apt install nginx * In the browser from another computer on the network, check that you the default HTML pa...") |
|||
Line 2: | Line 2: | ||
== Local HTTP server == | == Local HTTP server == | ||
as <code>root</code>: | |||
* Install nginx on the RPi | * Install nginx on the RPi | ||
apt install nginx | |||
* In the browser from another computer on the network, check that you the default HTML page is properly served: http://192.168.1.XXX (you should see a small "Welcome to nginx!" text). | * In the browser from another computer on the network, check that you the default HTML page is properly served: http://192.168.1.XXX (you should see a small "Welcome to nginx!" text). | ||
* create a non-default mini static website: | * create a non-default mini static website: | ||
mkdir /var/www/partyvan | |||
echo "OHAI" > /var/www/partyvan/index.html | |||
* disable nginx default site | |||
rm /etc/nginx/sites-enabled/default | |||
* create new nginx site config <code>/etc/nginx/sites-available/partyvan</code> with: | |||
server { | |||
listen 80 default_server; | |||
listen [::]:80 default_server; | |||
root /var/www/partyvan; | |||
index index.html; | |||
server_name partyvan; | |||
location / { | |||
try_files $uri $uri/ =404; | |||
} | |||
} | |||
== Tor setup == | == Tor setup == | ||
[[Category: Raspberry Pi]] | [[Category: Raspberry Pi]] |
Revision as of 21:18, 7 March 2020
blablabla
Local HTTP server
as root
:
- Install nginx on the RPi
apt install nginx
- In the browser from another computer on the network, check that you the default HTML page is properly served: http://192.168.1.XXX (you should see a small "Welcome to nginx!" text).
- create a non-default mini static website:
mkdir /var/www/partyvan echo "OHAI" > /var/www/partyvan/index.html
- disable nginx default site
rm /etc/nginx/sites-enabled/default
- create new nginx site config
/etc/nginx/sites-available/partyvan
with:
server { listen 80 default_server; listen [::]:80 default_server; root /var/www/partyvan; index index.html; server_name partyvan; location / { try_files $uri $uri/ =404; } }