Advertisement
kartuludus

webserver

Jun 21st, 2017
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 2.06 KB | None | 0 0
  1.  
  2. proxy_cache_path /etc/nginx/cache levels=1:2 keys_zone=pogo:10m max_size=750m inactive=60m;
  3.  
  4. server {
  5.     listen 80;
  6.  
  7.  
  8. location /.well-known/acme-challenge {
  9.   default_type "text/plain";
  10.   root /var/www/certbot;
  11. }
  12.  
  13.     # Forces all other requests to HTTPS
  14.     location / {
  15.         return      301 https://$host$request_uri;
  16.     }
  17. }
  18.  
  19. server {
  20.     listen 443 ssl http2;
  21.     server_name PokeMaps.yourdomain.com;
  22.  
  23.     ssl on;
  24.     ssl_certificate /etc/letsencrypt/live/poraakel.eu/fullchain.pem;
  25.     ssl_certificate_key /etc/letsencrypt/live/poraakel.eu/privkey.pem;
  26.     ssl_protocols TLSv1.2;
  27.     ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
  28.     ssl_prefer_server_ciphers on;
  29.     keepalive_timeout 70;
  30.     add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
  31.  
  32. location / {
  33.                 root /var/www/html;
  34.  
  35.                    }
  36.  
  37.    location /tallinn/ {
  38.  
  39.         proxy_cache pogo;
  40.        proxy_cache_valid any 30s;
  41.        add_header X-Proxy-Cache $upstream_cache_status;
  42.        proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
  43.  
  44.      proxy_pass http://127.0.0.1:5004/;
  45.         break;
  46.     }
  47.  
  48. location /tartu/ {
  49.  
  50.         proxy_cache pogo;
  51.        proxy_cache_valid any 30s;
  52.        add_header X-Proxy-Cache $upstream_cache_status;
  53.        proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
  54.  
  55.      proxy_pass http://127.0.0.1:5001/;
  56.         break;
  57.     }
  58. location /parnu/ {
  59.  
  60.         proxy_cache pogo;
  61.        proxy_cache_valid any 30s;
  62.        add_header X-Proxy-Cache $upstream_cache_status;
  63.        proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
  64.  
  65.      proxy_pass http://127.0.0.1:5002/;
  66.         break;
  67.     }
  68. location /haapsalu/ {
  69.  
  70.         proxy_cache pogo;
  71.        proxy_cache_valid any 30s;
  72.        add_header X-Proxy-Cache $upstream_cache_status;
  73.        proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
  74.  
  75.      proxy_pass http://127.0.0.1:5003/;
  76.         break;
  77.     }
  78.  
  79. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement