Advertisement
Guest User

Untitled

a guest
Feb 20th, 2020
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 2.00 KB | None | 0 0
  1. server {
  2.    
  3.     listen 80;
  4.  
  5.     root /var/web/www;
  6.  
  7.     # Add index.php to the list if you are using PHP
  8.     index index.php index.html index.htm index.nginx-debian.html;
  9.  
  10.     server_name ganertoriradio.live www.ganertoriradio.live;
  11.  
  12.     error_page 404 /custom_404.html;
  13.     location = /custom_404.html {
  14.         root /home/pro/common/error_pages;
  15.         internal;
  16.     }
  17.  
  18.     location / {
  19.         # First attempt to serve request as file, then
  20.         # as directory, then fall back to displaying a 404.
  21.         try_files $uri $uri/ =404;
  22.     }
  23.  
  24.     # pass PHP scripts to FastCGI server
  25.     #
  26.     location ~ \.php$ {
  27.         include snippets/fastcgi-php.conf;
  28.    
  29.     #   # With php-fpm (or other unix sockets):
  30.         fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
  31.     #   # With php-cgi (or other tcp sockets):
  32.     #   fastcgi_pass 127.0.0.1:9000;
  33.     }
  34.  
  35.     # deny access to .htaccess files, if Apache's document root
  36.     # concurs with nginx's one
  37.     #
  38.     #location ~ /\.ht {
  39.     #   deny all;
  40.     #}
  41. }
  42.  
  43. server {
  44.    
  45.     listen 443 ssl;
  46.     server_name ganertoriradio.live www.ganertoriradio.live;
  47.    
  48.     ssl on;
  49.     ssl_certificate /home/pro/certs/ganertoriradio/ganertoriradio.live.pem;
  50.     ssl_certificate_key /home/pro/certs/ganertoriradio/ganertoriradio.live.key;
  51.  
  52.     root /var/web/www;
  53.  
  54.     index index.php index.html index.htm index.nginx-debian.html;
  55.  
  56.     gzip on;
  57.     gzip_vary on;
  58.     gzip_types text/html application/x-javascript text/css application/javascript text/javascript text/plain text/xml application/json application/vnd.ms-fontobject application/x-font-opentype application/x-font-truetype application/x-font-ttf application/xml font/eot font/opentype font/otf image/svg+xml image/vnd.microsoft.icon;
  59.     gzip_disable "MSIE [1-6]\.";
  60.     client_max_body_size 50m;
  61.  
  62.     location ~ \.php$ {
  63.         try_files $uri /index.php =404;
  64.         fastcgi_split_path_info ^(.+\.php)(/.+)$;
  65.         fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
  66.         fastcgi_index index.php;
  67.         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  68.         fastcgi_read_timeout 900;
  69.     include fastcgi_params;
  70.     }
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement