Advertisement
jasonkovac

nginx.conf

May 18th, 2022
820
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 2.85 KB | None | 0 0
  1. server {      
  2.  
  3.     server_name www.example.com;
  4.     root /var/www/prosklad/public;
  5.  
  6.     gzip on;
  7.     gzip_disable "msie6";
  8.     gzip_vary on;
  9.     gzip_proxied any;
  10.     gzip_comp_level 6;
  11.     gzip_buffers 16 8k;
  12.     gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
  13.     client_max_body_size 3072m;
  14.     access_log /var/log/nginx/prosklad.access.log;
  15.     error_log /var/log/nginx/prosklad.error.log;
  16.  
  17.     # Point index to the Laravel front controller.
  18.  
  19.     location /socket.io {
  20.         proxy_set_header X-Real-IP $remote_addr;
  21.         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  22.         proxy_set_header Host $http_host;
  23.         proxy_set_header X-NginX-Proxy true;
  24.         proxy_pass http://localhost:6001;
  25.         proxy_redirect off;
  26.         proxy_http_version 1.1;
  27.         proxy_set_header Upgrade $http_upgrade;
  28.         proxy_set_header Connection "Upgrade";
  29.     }
  30.  
  31.     index index.php;
  32.  
  33.     location = /ping {
  34.             default_type application/json;
  35.             return 200 '{"ping": "Ok"}';
  36.         }  
  37.  
  38.     location / {
  39.            try_files $uri $uri/ /index.php?$query_string;
  40.         }
  41. ----------------------------------------------------------------------
  42.  
  43.      # New landing nuxt.js static page
  44.        
  45.      location ~ / {
  46.      alias /var/www/landing/dist/;
  47.      index 200.html;
  48.         try_files $uri $uri/ /200.html;
  49.      }
  50.  
  51.      location /snt {
  52.      alias /var/www/landing/dist/;
  53.      index index.html;
  54.         try_files $uri $uri/ /index.html;
  55.      }
  56.  
  57.  
  58.      location /tis {
  59.      alias /var/www/landing/dist/;
  60.      index index.html;
  61.         try_files $uri $uri/ /index.html;
  62.      }
  63.  
  64.      location /esf {
  65.      alias /var/www/landing/dist/;
  66.      index index.html;
  67.         try_files $uri $uri/ /index.html;
  68.      }
  69.  
  70.      location /for-clients {
  71.      alias /var/www/landing/dist/;
  72.      index index.html;
  73.         try_files $uri $uri/ /index.html;
  74.      }
  75.  
  76.     location /landing {
  77.         proxy_set_header X-Real-IP $remote_addr;
  78.         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  79.         proxy_set_header Host $http_host;
  80.         proxy_set_header X-NginX-Proxy true;
  81.         proxy_pass http://localhost:3000;
  82.         proxy_set_header Upgrade $http_upgrade;
  83.         proxy_set_header Connection "Upgrade";
  84.   }
  85.  
  86. -------------------------------------------------------------------------
  87.  
  88.     location ~ \.php$ {
  89.         try_files $uri /index.php =404;
  90.         fastcgi_split_path_info ^(.+\.php)(/.+)$;
  91.         fastcgi_pass unix:/run/php/php7.4-fpm.sock;
  92.         fastcgi_index index.php;
  93.         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  94.         include fastcgi_params;
  95.         fastcgi_read_timeout 1000;
  96.     }
  97.  
  98.     listen 80; # managed by Certbot
  99.  
  100. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement