Created
January 4, 2020 21:07
-
-
Save olivertappin/e9ccaf64458b0a84aa5a8665cc730e2d to your computer and use it in GitHub Desktop.
WordPress Nginx configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location / { | |
try_files $uri /index.php$is_args$args; | |
} | |
rewrite /wp-admin$ $scheme://$host$uri/ permanent; | |
location ~ /\. { | |
deny all; | |
} | |
location = /favicon.ico { | |
log_not_found off; | |
access_log off; | |
} | |
location = /robots.txt { | |
allow all; | |
log_not_found off; | |
access_log off; | |
} | |
location ~ ^/\.user\.ini { | |
deny all; | |
} | |
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { | |
expires max; | |
log_not_found off; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment