Advertisement
Guest User

Untitled

a guest
Nov 12th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. server {
  2. listen 56000;
  3. listen [::]:56000;
  4.  
  5. root /var/www/wordpress;
  6. index index.php;
  7. client_max_body_size 100M;
  8. if ($http_x_forwarded_proto != 'https') {
  9. return 301 https://$host$request_uri;
  10. }
  11.  
  12.  
  13. location ~* \.(ico|pdf|flv|jpg|jpeg|png|gif|webp|js|css|swf|x-html|css|xml|js|woff|woff2|ttf|svg|eot)$ {
  14. expires 30d;
  15. add_header Pragma public;
  16. log_not_found off;
  17. add_header Cache-Control "public";
  18. }
  19.  
  20.  
  21.  
  22. rewrite ^(.+)?/(wp-(includes|admin|content)(/.*)?) /$2 break;
  23.  
  24. location / {
  25. try_files $uri $uri/ /index.php?$args;
  26. rewrite ^/(.)(/wp-json/)(.)$ /index.php/wp-json/$3;
  27.  
  28. }
  29.  
  30. if (!-e $request_filename) {
  31. rewrite /wp-admin$ $scheme://$host$uri/ permanent;
  32. rewrite ^/[_0-9a-zA-Z-]+(/wp-.*) $1 last;
  33. rewrite ^/[_0-9a-zA-Z-]+(/.*\.php)$ $1 last;
  34. }
  35.  
  36. location ~ \.php$ {
  37. include snippets/fastcgi-php.conf;
  38. fastcgi_pass unix:/run/php/php7.1-fpm.sock;
  39. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  40. include fastcgi_params;
  41.  
  42. fastcgi_buffer_size 128k;
  43. fastcgi_buffers 4 256k;
  44. fastcgi_busy_buffers_size 256k;
  45.  
  46. }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement