Advertisement
oe4skw

Untitled

Apr 27th, 2017
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 5.98 KB | None | 0 0
  1. server {
  2.     listen 109.XXX.XXX.XXX:80;
  3.     listen 109.XXX.XXX.XXX:443 ssl;
  4.     server_name XXX.at;
  5.     return 301 https://www.XXX.at$request_uri;
  6. }
  7. server {
  8.             listen              109.XXX.XXX.XXX;
  9.             server_name         typo3.XXX.at XXX.XXX.at XXX.XXX.at XXX.XXX.at XXX.XXX.at ;
  10.                         return 301                      https://$server_name$request_uri;
  11.  
  12. }
  13. server {
  14.             listen              109.XXX.XXX.XXX:443 ssl http2;
  15.             server_name         typo3.XXX.at XXX.XXX.at XXX.XXX.at XXX.XXX.at XXX.XXX.at ;
  16.             root                /var/www/typo3/htdocs;
  17.             index               index.php index.html index.htm;
  18.             charset             utf-8;
  19.             error_page 404      /index.php;
  20.             ssl_certificate     ssl/XXX.at.pem;
  21.             ssl_certificate_key ssl/XXX.at.key.pem;
  22.             ssl_trusted_certificate ssl/XXX.at.pem;
  23.             ssl_dhparam         ssl/dh.pem;
  24.             ssl_ecdh_curve      secp384r1;
  25.             ssl_session_cache   shared:SSL:10m;
  26.             ssl_session_timeout 10m;
  27.             ssl_session_tickets off;
  28.             ssl_protocols       TLSv1 TLSv1.1 TLSv1.2;
  29.             ssl_prefer_server_ciphers on;
  30.             ssl_buffer_size     1400;
  31.             ssl_stapling        off;
  32.             ssl_stapling_verify on;
  33.             resolver            8.8.8.8 8.8.4.4 208.67.222.222 208.67.220.220 valid=60s;
  34.             resolver_timeout    2s;
  35.             ssl_ciphers         "XXXXX";
  36.             #add_header         Public-Key-Pins 'pin-sha256="PIN1"; pin-sha256="PIN2"; max-age=5184000; includeSubDomains';
  37.             add_header          Cache-Control "public";
  38.             add_header          X-Frame-Options SAMEORIGIN;
  39.             add_header          Alternate-Protocol  443:npn-http/2;
  40.             add_header          X-Content-Type-Options nosniff;
  41.             add_header          X-XSS-Protection "1; mode=block";
  42.             add_header          X-Permitted-Cross-Domain-Policies "master-only";
  43.             add_header          "X-UA-Compatible" "IE=Edge";
  44.             add_header          "Access-Control-Allow-Origin" "*";
  45.             add_header          Content-Security-Policy "script-src 'self' 'unsafe-inline' 'unsafe-eval' *.youtube.com maps.gstatic.com *.googleapis.com *.google-analytics.com cdnjs.cloudflare.com assets.zendesk.com connect.facebook.net; child-src 'self' *.youtube.com assets.zendesk.com *.facebook.com s-static.ak.facebook.com tautt.zendesk.com; object-src 'self'";
  46.             pagespeed           on;
  47.             pagespeed           EnableFilters collapse_whitespace;
  48.             pagespeed           EnableFilters canonicalize_javascript_libraries;
  49.             pagespeed           EnableFilters combine_css;
  50.             pagespeed           EnableFilters combine_javascript;
  51.             pagespeed           EnableFilters elide_attributes;
  52.             pagespeed           EnableFilters extend_cache;
  53.             pagespeed           EnableFilters flatten_css_imports;
  54.             pagespeed           EnableFilters lazyload_images;
  55.             pagespeed           EnableFilters rewrite_javascript;
  56.             pagespeed           EnableFilters rewrite_images;
  57.             pagespeed           EnableFilters insert_dns_prefetch;
  58.             pagespeed           EnableFilters prioritize_critical_css;
  59.             pagespeed           FetchHttps enable,allow_self_signed;
  60.             pagespeed           FileCachePath /var/lib/nginx/nps_cache;
  61.             pagespeed           RewriteLevel CoreFilters;
  62.             pagespeed           CssFlattenMaxBytes 5120;
  63.             pagespeed           LogDir /var/log/pagespeed;
  64.             pagespeed           EnableCachePurge on;
  65.             pagespeed           PurgeMethod PURGE;
  66.             pagespeed           DownstreamCachePurgeMethod PURGE;
  67.             pagespeed           DownstreamCachePurgeLocationPrefix http://127.0.0.1:80/;
  68.             pagespeed           DownstreamCacheRewrittenPercentageThreshold 95;
  69.             pagespeed           LazyloadImagesAfterOnload on;
  70.             pagespeed           LazyloadImagesBlankUrl "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";
  71.             pagespeed           MemcachedThreads 1;
  72.             pagespeed           MemcachedServers "localhost:11211";
  73.             pagespeed           MemcachedTimeoutUs 100000;
  74.             pagespeed           RespectVary on;
  75.             pagespeed           Disallow "*/pma/*";
  76.             # This will correctly rewrite your subresources with https:// URLs and thus avoid mixed content warnings.
  77.             # Note, that you should only enable this option if you are behind a load-balancer that will set this header,
  78.             # otherwise your users will be able to set the protocol PageSpeed uses to interpret the request.
  79.             #
  80.             #pagespeed          RespectXForwardedProto on;
  81.             auth_basic_user_file htpasswd/.htpasswd;
  82.  index index.php index.html;
  83.        location = /favicon.ico {
  84.                 log_not_found off;
  85.                 access_log off;
  86.        }
  87.  
  88.        location = /robots.txt {
  89.                 allow all;
  90.                 log_not_found off;
  91.                 access_log off;
  92.        }
  93.  
  94.        # Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
  95.        location ~ /\. {
  96.                 deny all;
  97.                 access_log off;
  98.                 log_not_found off;
  99.        }
  100.  
  101.         location ~ \.php$ {
  102.                         try_files $uri =404;
  103.                         include /etc/nginx/fastcgi_params;
  104.                         fastcgi_pass 127.0.0.1:9000;
  105.                         fastcgi_index index.php;
  106.                         #fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  107.                         fastcgi_param    PATH_TRANSLATED    $document_root$fastcgi_script_name;  
  108.             fastcgi_intercept_errors on;
  109.                         fastcgi_buffer_size 128k;
  110.                         fastcgi_buffers 256 16k;
  111.                         fastcgi_busy_buffers_size 256k;
  112.                         fastcgi_temp_file_write_size 256k;
  113.                         fastcgi_read_timeout 1200;
  114.         }
  115.        
  116.         client_max_body_size 100M;
  117.  
  118.         location ~ /\.(js|css)$ {
  119.                 expires 604800s;
  120.         }
  121.  
  122.         if (!-e $request_filename){
  123.                 rewrite ^/(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gzip)$ /$1.$3 last;
  124.         }
  125.  
  126.         location ~* ^/fileadmin/(.*/)?_recycler_/ {
  127.                 deny all;
  128.         }
  129.         location ~* ^/fileadmin/templates/.*(\.txt|\.ts)$ {
  130.                 deny all;
  131.         }
  132.         location ~* ^/typo3conf/ext/[^/]+/Resources/Private/ {
  133.                 deny all;
  134.         }
  135.         location ~* ^/(typo3/|fileadmin/|typo3conf/|typo3temp/|uploads/|favicon\.ico) {
  136.         }
  137.  
  138.         location / {
  139.     try_files $uri $uri/ /index.php?$args;      
  140.         }
  141.  
  142.         location @nocache {
  143.                         try_files $uri $uri/ /index.php$is_args$args;
  144.         }
  145. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement