105 lines
3.5 KiB
Plaintext
105 lines
3.5 KiB
Plaintext
add_header Onion-Location http://wb.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion$request_uri;
|
|
add_header X-I2P-Location http://vern6pan5qgqcivwnyh22rsrln2btrvdw57c22naxhmlqpu7zdvq.b32.i2p$request_uri;
|
|
root /var/www/wiby;
|
|
# Add index.php to the list if you are using PHP
|
|
index index.php index.html index.htm;
|
|
|
|
|
|
location = / { #core app
|
|
proxy_cache main_cache;
|
|
proxy_cache_valid 5m;
|
|
proxy_cache_bypass $no_cache;
|
|
proxy_no_cache $no_cache;
|
|
try_files $uri $uri/ =404;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_pass http://remote_core/;
|
|
}
|
|
location /settings/ { #core app
|
|
try_files $uri $uri/ =404;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_pass http://remote_core/settings/;
|
|
}
|
|
location = /json/ { #core app
|
|
proxy_cache main_cache;
|
|
proxy_cache_valid 5m;
|
|
proxy_cache_bypass $no_cache;
|
|
proxy_no_cache $no_cache;
|
|
try_files $uri $uri/ =404;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_pass http://remote_core/json/;
|
|
}
|
|
location = /surprise/ { #core app
|
|
# try_files $uri $uri/ =404;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_pass http://remote_core/surprise/;
|
|
}
|
|
|
|
location / {
|
|
# First attempt to serve request as file, then
|
|
# as directory, then fall back to displaying a 404.
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
|
|
# pass PHP scripts to FastCGI server
|
|
#
|
|
location ~ \.php$ {
|
|
# try_files $url = 404;
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
# regex to split $uri to $fastcgi_script_name and $fastcgi_path
|
|
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
|
|
|
# Check that the PHP script exists before passing it
|
|
try_files $fastcgi_script_name =404;
|
|
|
|
# Bypass the fact that try_files resets $fastcgi_path_info
|
|
# see: http://trac.nginx.org/nginx/ticket/321
|
|
set $path_info $fastcgi_path_info;
|
|
fastcgi_param PATH_INFO $path_info;
|
|
|
|
fastcgi_index index.php;
|
|
include snippets/fastcgi.conf;
|
|
include snippets/fastcgi.conf;
|
|
#
|
|
# # With php-fpm (or other unix sockets):
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
|
|
# fastcgi_index index.php;
|
|
# # With php-cgi (or other tcp sockets):
|
|
# fastcgi_pass 127.0.0.1:9000;
|
|
# #for microcaching
|
|
fastcgi_cache MYAPP;
|
|
fastcgi_cache_valid 5m;
|
|
fastcgi_cache_bypass $no_cache;
|
|
fastcgi_no_cache $no_cache;
|
|
}
|
|
|
|
|
|
# deny access to .htaccess files, if Apache's document root
|
|
|
|
# concurs with nginx's one
|
|
#
|
|
#location ~ /\.ht {
|
|
# deny all;
|
|
#}
|
|
|
|
# Don't cache the following URLs
|
|
if ($request_uri ~* "/(review/|index.php)") { set $no_cache 1; }
|
|
if ($request_uri ~* "/(review/|login.html.php)") { set $no_cache 1; }
|
|
if ($request_uri ~* "/(review/|inndexqueue.html.php)") { set $no_cache 1; }
|
|
if ($request_uri ~* "/(review/|review.php)") { set $no_cache 1; }
|
|
if ($request_uri ~* "/(review/|error.html.php)") { set $no_cache 1; }
|
|
|
|
if ($request_uri ~* "/(insert/|index.php)") { set $no_cache 1; }
|
|
if ($request_uri ~* "/(insert/|login.html.php)") { set $no_cache 1; }
|
|
if ($request_uri ~* "/(insert/|form.html.php)") { set $no_cache 1; }
|
|
if ($request_uri ~* "/(insert/|insert.php)") { set $no_cache 1; }
|
|
if ($request_uri ~* "/(insert/|error.html.php)") { set $no_cache 1; }
|
|
if ($request_uri ~* "/(insert/|insert.html.php)") { set $no_cache 1; }
|
|
|
|
if ($request_uri ~* "/(surprise/|index.php)") { set $no_cache 1; }
|
|
|
|
if ($request_uri ~* "/(submit/|index.php)") { set $no_cache 1; }
|
|
if ($request_uri ~* "/(submit/|form.html.php)") { set $no_cache 1; }
|
|
if ($request_uri ~* "/(submit/|submit.html.php)") { set $no_cache 1; }
|
|
if ($request_uri ~* "/(submit/|error.html.php)") { set $no_cache 1; }
|