Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- server_name domainname.com *.domainname.com;
- index index.php;
- root /www/domainname/public;
- # Logging
- access_log off;
- location / {
- try_files $uri $uri/ /index.php?$args;
- }
- location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
- expires 30d;
- add_header Pragma public;
- add_header Cache-Control "public";
- }
- location ~ \.php$ {
- location ~ /wp-(admin|login) {
- return 301 https://$host/wp-admin/;
- }
- try_files $uri =404;
- include fastcgi_params;
- fastcgi_pass unix:/var/run/php5-fpm.sock;
- }
- # Leverage Browser Caching
- location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
- expires 1y;
- log_not_found off;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement