Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- server_name drupal8.loc;
- root /Users/ApacheEx/WEB/drupal8;
- include /usr/local/etc/nginx/conf.d/php-fpm;
- location = /favicon.ico {
- log_not_found off;
- access_log off;
- }
- location = /robots.txt {
- allow all;
- log_not_found off;
- access_log off;
- }
- # Very rarely should these ever be accessed outside of your lan
- location ~* \.(txt|log)$ {
- allow 127.0.0.1;
- deny all;
- }
- location ~ \..*/.*\.php$ {
- return 403;
- }
- location ~ ^/sites/.*/private/ {
- return 403;
- }
- # Allow "Well-Known URIs" as per RFC 5785
- location ~* ^/.well-known/ {
- allow all;
- }
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
- location / {
- try_files $uri @rewrite;
- }
- location @rewrite {
- rewrite ^ /index.php;
- }
- # Don't allow direct access to PHP files in the vendor directory.
- location ~ /vendor/.*\.php$ {
- deny all;
- return 404;
- }
- location ~ ^/sites/.*/files/imagecache/ {
- try_files $uri @rewrite;
- }
- location ~ ^/sites/.*/files/styles/ {
- try_files $uri @rewrite;
- }
- location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
- expires max;
- log_not_found off;
- }
- }
Add Comment
Please, Sign In to add comment