Advertisement
Guest User

ISPManager default nginx-config

a guest
Aug 11th, 2019
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 2.58 KB | None | 0 0
  1. server {
  2.     server_name domain.tld www.domain.tld;
  3.     charset off;
  4.     index index.php index.html;
  5.     disable_symlinks if_not_owner from=$root_path;
  6.     include /etc/nginx/vhosts-includes/*.conf;
  7.     include /etc/nginx/vhosts-resources/domain.tld/*.conf;
  8.     access_log /var/www/httpd-logs/domain.tld.access.log;
  9.     error_log /var/www/httpd-logs/domain.tld.error.log notice;
  10.     ssi on;
  11.     set $root_path /var/www/username/data/www/domain.tld;
  12.     root $root_path;
  13.     location / {
  14.         location ~ [^/]\.ph(p\d*|tml)$ {
  15.             try_files /does_not_exists @php;
  16.         }
  17.     }
  18.     return 301 https://$host:443$request_uri;
  19.     gzip on;
  20.     gzip_comp_level 5;
  21.     gzip_disable "msie6";
  22.     gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
  23.     listen 192.168.0.4:80;
  24.     location @php {
  25.         fastcgi_index index.php;
  26.         fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f webmaster@domain.tld";
  27.         fastcgi_pass unix:/var/www/php-fpm/username.sock;
  28.         fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$;
  29.         try_files $uri =404;
  30.         include fastcgi_params;
  31.     }
  32. }
  33. server {
  34.     server_name domain.tld www.domain.tld;
  35.     ssl_certificate "/var/www/httpd-cert/username/domain.tld_le1.crtca";
  36.     ssl_certificate_key "/var/www/httpd-cert/username/domain.tld_le1.key";
  37.     ssl_ciphers EECDH:+AES256:-3DES:RSA+AES:!NULL:!RC4;
  38.     ssl_prefer_server_ciphers on;
  39.     ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  40.     add_header Strict-Transport-Security "max-age=31536000;";
  41.     ssl_dhparam /etc/ssl/certs/dhparam4096.pem;
  42.     charset off;
  43.     index index.php index.html;
  44.     disable_symlinks if_not_owner from=$root_path;
  45.     include /etc/nginx/vhosts-includes/*.conf;
  46.     include /etc/nginx/vhosts-resources/domain.tld/*.conf;
  47.     access_log /var/www/httpd-logs/domain.tld.access.log;
  48.     error_log /var/www/httpd-logs/domain.tld.error.log notice;
  49.     ssi on;
  50.     set $root_path /var/www/username/data/www/domain.tld;
  51.     root $root_path;
  52.     gzip on;
  53.     gzip_comp_level 5;
  54.     gzip_disable "msie6";
  55.     gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
  56.     location / {
  57.         location ~ [^/]\.ph(p\d*|tml)$ {
  58.             try_files /does_not_exists @php;
  59.         }
  60.     }
  61.     listen 192.168.0.4:443 ssl http2;
  62.     location @php {
  63.         fastcgi_index index.php;
  64.         fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f webmaster@domain.tld";
  65.         fastcgi_pass unix:/var/www/php-fpm/username.sock;
  66.         fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$;
  67.         try_files $uri =404;
  68.         include fastcgi_params;
  69.     }
  70. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement