Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- upstream flask {
- server 127.0.0.1:5005;
- }
- upstream devkat {
- server 127.0.0.1:1337;
- }
- server {
- listen 80;
- server_name example.de www.example.de;
- location /.well-known/acme-challenge {
- default_type "text/plain";
- root /var/www/certbot;
- }
- # Forces all other requests to HTTPS
- location / {
- return 301 https://$host$request_uri;
- }
- }
- server {
- listen 443 ssl http2;
- server_name example.de www.example.de;
- ssl on;
- ssl_certificate /etc/letsencrypt/live/example.de/fullchain.pem;
- ssl_certificate_key /etc/letsencrypt/live/example.de/privkey.pem;
- ssl_protocols TLSv1.2;
- ssl_ciphers 'make-your-own';
- ssl_prefer_server_ciphers on;
- keepalive_timeout 70;
- add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
- root /var/www/html/Worldopole;
- location / {
- # rewrite "^/core/(css|js)/(.+)\.(\d{10})\.(css|js)$" /core/$1/$2.$4 last;
- try_files $uri /index.php?$args;
- }
- location ~* "^/core/(css|js)/(.+)\.(\d{10})\.(css|js)$" {
- alias /var/www/html/Worldopole/core/$1/$2.$4;
- add_header Vary Accept-Encoding;
- expires max;
- }
- # nginx configuration
- # location /pokemon {
- # rewrite ^/pokemon/(.*)$ /index.php?page=pokemon&id=$1 last;
- #
- # }
- location = /pokestops {
- rewrite ^(.*)$ /index.php?page=pokestops last;
- }
- location = /gym {
- rewrite ^(.*)$ /index.php?page=gym last;
- }
- location = /devlog {
- rewrite ^(.*)$ /index.php?page=devlog last;
- }
- location = /faq {
- rewrite ^(.*)$ /index.php?page=faq last;
- }
- location = /trainer {
- rewrite ^(.*)$ /index.php?page=trainer last;
- }
- location = /dashboard {
- rewrite ^(.*)$ /index.php?page=dashboard last;
- }
- location = /pokemon {
- rewrite ^(.*)$ /index.php?page=pokedex last;
- rewrite ^(.*)$ /index.php?page=pokedex last;
- }
- location = /nests {
- rewrite ^(.*)$ /index.php?page=nests last;
- }
- location = /raids {
- rewrite ^(.*)$ /index.php?page=raids last;
- }
- location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt)$ {
- access_log off;
- expires max;
- }
- location ^~ /go/ {
- # Group based Password authentication:
- auth_basic "Administrator’s area";
- auth_basic_user_file /etc/nginx/allowedusers;
- root /var/www/nginx/html/;
- proxy_pass http://flask/;
- proxy_redirect off;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto http;
- proxy_set_header Host $http_host;
- }
- location ^~ /pokemon/ {
- # Group based Password authentication:
- # auth_basic "Administrator�~@~Ys area";
- # auth_basic_user_file /etc/nginx/allowedusers;
- proxy_pass http://flask;
- proxy_redirect off;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto http;
- proxy_set_header Host $http_host;
- rewrite ^/pokemon/(.*)$ /index.php?page=pokemon&id=$1 last;
- }
- location ~ \.php$ {
- include /etc/nginx/fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_param PATH_INFO $fastcgi_path_info;
- fastcgi_split_path_info ^(.+\.php)(/.*)$;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- }
- location /go/raw_data {
- # /stats
- if ($arg_seen = "true") {
- proxy_pass http://flask;
- }
- # /status
- if ($arg_status = "true") {
- proxy_pass http://flask;
- }
- # Appearances & appearance details.
- if ($arg_appearances = "true") {
- proxy_pass http://flask;
- }
- if ($arg_appearancesDetails = "true") {
- proxy_pass http://flask;
- }
- # Spawnpoints.
- if ($arg_spawnpoints = "true") {
- proxy_pass http://flask;
- }
- # Scanned locations.
- if ($arg_scanned = "true") {
- proxy_pass http://flask;
- }
- proxy_pass https://devkat/raw_data;
- }
- }
- server {
- listen 443;
- server_name 123.456.789.230;
- return 301 https://example.de/;
- }
- server {
- listen 80;
- server_name 123.456.789.230;
- return 301 https://example.de/;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement