Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- #listen 80 default_server;
- #listen [::]:80 default_server ipv6only=on;
- listen 443;
- ssl on;
- ssl_certificate /xx/xxx/xxx/ssl.crt;
- ssl_certificate_key /xx/xxx/xxx/ssl.key;
- root /var/www/html/drupal;
- index index.php index.html index.htm;
- error_page 404 /404.html;
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- root /usr/share/nginx/html;
- }
- location = /favicon.ico {
- log_not_found off;
- access_log off;
- }
- location = /robots.txt {
- allow all;
- log_not_found off;
- access_log off;
- }
- location ~ \..*/.*\.php$ {
- return 403;
- }
- location ~ ^/sites/.*/private/ {
- return 403;
- }
- location ~ (^|/)\. {
- return 403;
- }
- location / {
- try_files $uri @rewrite;
- }
- location @rewrite {
- rewrite ^ /index.php;
- }
- location ~ \.php$ {
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- fastcgi_pass unix:/var/run/php5-fpm.sock;
- }
- location ~ ^/sites/.*/files/styles/ {
- try_files $uri @rewrite;
- }
- ### advagg_css and advagg_js support
- location ~* files/advagg_(?:css|js)/ {
- access_log off;
- expires max;
- add_header ETag "";
- add_header Cache-Control "max-age=2628000, no-transform, public";
- try_files $uri $uri/ @rewrites;
- #try_files $uri @drupal;
- }
- location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
- expires max;
- log_not_found off;
- }
- }
- server {
- server_name www.SITENAME.com SITENAME.com;
- return 301 https://SITENAME.com$request_uri;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement