Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- upstream pogomap {
- server localhost:3331;
- server localhost:3332;
- server localhost:3333;
- server localhost:3334;
- server localhost:3335;
- server localhost:3336;
- server localhost:3337;
- server localhost:3338;
- }
- server {
- listen 80;
- server_name mysite.com; www.mysite.com
- 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 mysite.com www.mysite.com;
- ssl_certificate /etc/letsencrypt/live/mysite.com/fullchain.pem;
- ssl_certificate_key /etc/letsencrypt/live/mysite.com/privkey.pem;
- add_header X-Cache-Status $upstream_cache_status;
- root /var/www/html;
- index index.php index.html index.htm;
- #access_log /var/log/nginx/www.access.log
- #error_log /var/log/nginx/www.error.log;
- rewrite_log on;
- log_not_found off;
- charset UTF-8;
- #specific pokemon vs all pokemon
- rewrite ^/pokemon/(.+)$ /index.php?page=pokemon&id=$1 break;
- rewrite ^/pokemon/?$ /index.php?page=pokedex break;
- #page rewrites
- rewrite ^/(pokestops|gym|dashboard|devlog|faq|trainer|nests)$ /index.php?page=$1$
- #static files
- rewrite "^/core/(css|js)/(.+)\.(\d{10})\.(css|js)$" /core/$1/$2.$4 break;
- client_header_buffer_size 4k;
- client_max_body_size 2047M;
- client_body_buffer_size 128k;
- client_body_temp_path /tmp 1 2;
- ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
- ssl_prefer_server_ciphers on;
- ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA$
- ssl_session_cache shared:ssl_session_cache:10m;
- ##Disable viewing .htaccess & .htpassword
- location ~ /\.ht {
- deny all;
- return 404;
- }
- location ~ /.well-known {
- allow all;
- }
- location /nginx_status {
- # Turn on stats
- stub_status on;
- access_log off;
- }
- location ~ .php$ {
- fastcgi_split_path_info ^(.+\.php)(.*)$;
- fastcgi_pass unix:/run/php/php7.0-fpm.sock;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params;
- fastcgi_param QUERY_STRING $query_string;
- fastcgi_param REQUEST_METHOD $request_method;
- fastcgi_param CONTENT_TYPE $content_type;
- fastcgi_param CONTENT_LENGTH $content_length;
- fastcgi_intercept_errors off;
- fastcgi_ignore_client_abort off;
- fastcgi_connect_timeout 60;
- fastcgi_send_timeout 180;
- fastcgi_read_timeout 180;
- fastcgi_buffering on;
- fastcgi_max_temp_file_size 0;
- }
- location /bkkth/ {
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto http;
- proxy_set_header Host $http_host;
- proxy_redirect off;
- proxy_pass http://pogomap/;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement