Guest User

nginx_conf

a guest
May 14th, 2017
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 1.43 KB | None | 0 0
  1. server {
  2.  
  3.         location ~ /.well-known {
  4.                 allow all;
  5.         }
  6.  
  7.         listen 80 default_server;
  8.         listen [::]:80 default_server;
  9.         server_name mydomain.com;
  10.         return 301 https://$server_name$request_uri;
  11. }
  12.  
  13. server {
  14.         listen 443 ssl http2 default_server;
  15.         listen [::]:443 ssl http2 default_server;
  16.         include snippets/ssl-mydomain.com.conf;
  17.         include snippets/ssl-params.conf;
  18.  
  19.         root /var/www/html;
  20.  
  21.         # Add index.php to the list if you are using PHP
  22.         index index.html index.htm index.nginx-debian.html;
  23.  
  24.         server_name _;
  25.  
  26.         location / {
  27.                 # First attempt to serve request as file, then
  28.                 # as directory, then fall back to displaying a 404.
  29.                 try_files $uri $uri/ =404;
  30.                 proxy_pass http://localhost:3000;
  31.                 proxy_http_version 1.1;
  32.                 proxy_set_header Upgrade $http_upgrade;
  33.                 proxy_set_header Connection 'upgrade';
  34.                 proxy_set_header Host $host;
  35.                 proxy_cache_bypass $http_upgrade;
  36.         }
  37.  
  38.         location /dash {
  39.                 proxy_pass http://localhost:3000;
  40.         }
  41.                 location ~^/(images/|img/|javascripts/|js/|css/|stylesheets/|flash/|media/|static/|robots.txt|humans.txt|favicon.ico) {
  42.           root /var/www/html/public;
  43.           access_log off;
  44.           expires max;
  45.         }
  46.  
  47. }
Add Comment
Please, Sign In to add comment