translation stuff; cgi for website; fulltextrss

This commit is contained in:
root 2022-11-23 11:45:25 +00:00
parent 2aa614b9c5
commit 5b7ec0fef5
4 changed files with 65 additions and 0 deletions

16
common/fulltextrss.conf Normal file
View File

@ -0,0 +1,16 @@
add_header Onion-Location http://ftr.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion$request_uri;
add_header X-I2P-Location http://vernz3gvdqo6dtfaqmbwqrgzfmhwblfbonvtumo63f3q3h7cr5eq.b32.i2p$request_uri;
root /var/www/full-text-rss;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php;
}
location ~ \.php$ {
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/snippets/fastcgi.conf;
}

View File

@ -48,12 +48,27 @@ location / {
}
}
error_page 403 /en/errors/403;
error_page 404 /en/errors/404;
error_page 503 /en/errors/503;
location /en {
try_files $uri $uri/index.html $uri.html $uri/ @extensionless-php;
error_page 403 /en/errors/403;
error_page 404 /en/errors/404;
error_page 503 /en/errors/503;
}
location ~ (\.cgi|\.py|\.sh|\.pl|\.lua|\/cgi-bin)$ {
gzip off;
fastcgi_pass unix:/run/fcgiwrap.socket;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
}
location /pt-BR {
try_files $uri $uri/index.html $uri.html $uri/ @extensionless-php;
error_page 403 /pt-BR/errors/403;
error_page 404 /pt-BR/errors/404;
error_page 503 /pt-BR/errors/503;
}
location ~^/[^u~].*\.(jpg|jpeg|png|gif|ico)$ {
expires 30d;

View File

@ -1,6 +1,7 @@
map $http_accept_language $lang {
default en;
~en en;
pt pt-BR;
~es es;
~fr fr;
}

33
conf.d/fulltextrss.conf Normal file
View File

@ -0,0 +1,33 @@
server {
listen 80;
listen [::]:80;
server_name ftr.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion fulltextrss.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion;
include common/fulltextrss.conf;
}
server {
listen 11012;
listen [::]:11012;
server_name vernz3gvdqo6dtfaqmbwqrgzfmhwblfbonvtumo63f3q3h7cr5eq.b32.i2p;
include common/fulltextrss.conf;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name ftr.vern.cc fulltextrss.vern.cc;
include snippets/lets-encrypt.conf;
include common/fulltextrss.conf;
}
server {
listen 80;
listen [::]:80;
return 301 https://$host$request_uri;
server_name ftr.vern.cc fulltextrss.vern.cc;
}