Advertisement
Guest User

Untitled

a guest
Jan 25th, 2021
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 1.93 KB | None | 0 0
  1. map $sent_http_content_type $expires {
  2.     "text/html"                 epoch;
  3.     "text/html; charset=utf-8"  epoch;
  4.     default                     off;
  5. }
  6.  
  7. server {
  8.     listen          80;             # the port nginx is listening on
  9.     server_name     your-domain;    # setup your domain here
  10.  
  11.     gzip            on;
  12.     gzip_types      text/plain application/xml text/css application/javascript;
  13.     gzip_min_length 1000;
  14.  
  15.     location / {
  16.         expires $expires;
  17.  
  18.         proxy_redirect                      off;
  19.         proxy_set_header Host               $host;
  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 X-Forwarded-Proto  $scheme;
  23.         proxy_read_timeout          1m;
  24.         proxy_connect_timeout       1m;
  25.         proxy_pass                          http://127.0.0.1:3000; # set the address of the Node.js instance here
  26.     }
  27.  
  28.     include phpmyadmin.conf;
  29.     location ~ ^\/mysql(\/?)$ {
  30.         return 301 /phpmyadmin/;
  31.     }
  32. }
  33.  
  34. server {
  35.     listen 8000;
  36.     server_name server_domain_or_IP;
  37.     root /var/www/default/site/laravel/public;
  38.  
  39.     add_header X-Frame-Options "SAMEORIGIN";
  40.     add_header X-XSS-Protection "1; mode=block";
  41.     add_header X-Content-Type-Options "nosniff";
  42.  
  43.     index index.html index.htm index.php;
  44.  
  45.     charset utf-8;
  46.  
  47.     location / {
  48.         try_files $uri $uri/ /index.php?$query_string;
  49.     }
  50.  
  51.     location = /favicon.ico { access_log off; log_not_found off; }
  52.     location = /robots.txt  { access_log off; log_not_found off; }
  53.  
  54.     error_page 404 /index.php;
  55.  
  56.     location ~ \.php$ {
  57.         fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
  58.         fastcgi_index index.php;
  59.         fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
  60.         include fastcgi_params;
  61.     }
  62.  
  63.     location ~ /\.(?!well-known).* {
  64.         deny all;
  65.     }
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement