new structure
This kicks off the basic tree structure, where the docs all mirror the reality, like an ascii penumbra.
This commit is contained in:
26
kralizec/dmzrs/README.md
Normal file
26
kralizec/dmzrs/README.md
Normal file
@@ -0,0 +1,26 @@
|
||||
Add this configuration to ~/.ssh/config file
|
||||
|
||||
Host dmzkrovdmzrs12
|
||||
Hostname veyxphzuqnooc7wb7utfza3joaoopgqgwp6l6d4en5yfmyr7kxvminqd.onion
|
||||
User root
|
||||
IdentityFile ~/.ssh/id_rsa
|
||||
PasswordAuthentication no
|
||||
|
||||
Now you can log in by typing:
|
||||
torsocks ssh dmzkrovdmzrs12
|
||||
|
||||
Install all needed packages
|
||||
apt install rsync git nginx
|
||||
git clone https://gitea.dmz.rs/Decentrala/website
|
||||
|
||||
Run updatewebsite.sh script every minute using crontab (run "crontab -e")
|
||||
This fill automaticlly pull from git repo and regenerate events page
|
||||
|
||||
Add nginx-dmz.rs.conf to /etc/nginx/sites-available/dmz.rs and create a symlink
|
||||
from /etc/nginx/sites-enabled/dmz.rs to that file
|
||||
You can do this by running:
|
||||
ln -s /etc/nginx/sites-available/dmz.rs /etc/nginx/sites-enabled/dmz.rs
|
||||
|
||||
Increase server_names_hash_bucket_size to 256 in /etc/nginx/nginx.conf in order to support onion addresses.
|
||||
|
||||
In the nginx configuration /account/ is redirected to luser (https://gitea.dmz.rs/fram3d/luser) instance running at 192.168.1.211
|
45
kralizec/dmzrs/nginx-dmz.rs.conf
Normal file
45
kralizec/dmzrs/nginx-dmz.rs.conf
Normal file
@@ -0,0 +1,45 @@
|
||||
server {
|
||||
listen 80 ;
|
||||
listen [::]:80 ;
|
||||
|
||||
server_name dmz.rs decentrala.org www.dmz.rs www.decentrala.org krov.dmz.rs krov.decentrala.org 64l3awuotocv6ynibul6malho6wdorggjrz6fiyuselniifhdv2kv6qd.onion;
|
||||
|
||||
autoindex off;
|
||||
default_type "text/html";
|
||||
|
||||
index index.html index.htm index.nginx-debian.html;
|
||||
|
||||
error_page 404 /404.html;
|
||||
|
||||
root /var/www/dmzrs;
|
||||
|
||||
# If page doesn't exist try appending .html to the end
|
||||
location / {
|
||||
try_files $uri $uri.html;
|
||||
}
|
||||
|
||||
# Don't append .html if url is just / , since there is no file named /.html
|
||||
location = / {
|
||||
}
|
||||
|
||||
# If url ends with .html don't reddirect
|
||||
location ~* \.html$ {
|
||||
}
|
||||
|
||||
# If url is /en/ set english index file
|
||||
location = /en/ {
|
||||
try_files $uri $uri/index.html;
|
||||
}
|
||||
|
||||
location /account/ {
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
|
||||
proxy_pass http://192.168.1.211$request_uri;
|
||||
}
|
||||
|
||||
location = /account {
|
||||
try_files $uri $uri.html;
|
||||
}
|
||||
|
||||
}
|
7
kralizec/dmzrs/updatewebsite.sh
Executable file
7
kralizec/dmzrs/updatewebsite.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
cd /root/website
|
||||
/usr/bin/git restore .
|
||||
/usr/bin/git pull
|
||||
/usr/bin/python3 prep.py
|
||||
/usr/bin/python3 build_pages.py
|
||||
/usr/bin/rsync -a --delete /root/website/site/* /var/www/dmzrs/
|
Reference in New Issue
Block a user