Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 56000;
- listen [::]:56000;
- root /var/www/wordpress;
- index index.php;
- client_max_body_size 100M;
- if ($http_x_forwarded_proto != 'https') {
- return 301 https://$host$request_uri;
- }
- location ~* \.(ico|pdf|flv|jpg|jpeg|png|gif|webp|js|css|swf|x-html|css|xml|js|woff|woff2|ttf|svg|eot)$ {
- expires 30d;
- add_header Pragma public;
- log_not_found off;
- add_header Cache-Control "public";
- }
- rewrite ^(.+)?/(wp-(includes|admin|content)(/.*)?) /$2 break;
- location / {
- try_files $uri $uri/ /index.php?$args;
- rewrite ^/(.)(/wp-json/)(.)$ /index.php/wp-json/$3;
- }
- if (!-e $request_filename) {
- rewrite /wp-admin$ $scheme://$host$uri/ permanent;
- rewrite ^/[_0-9a-zA-Z-]+(/wp-.*) $1 last;
- rewrite ^/[_0-9a-zA-Z-]+(/.*\.php)$ $1 last;
- }
- location ~ \.php$ {
- include snippets/fastcgi-php.conf;
- fastcgi_pass unix:/run/php/php7.1-fpm.sock;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params;
- fastcgi_buffer_size 128k;
- fastcgi_buffers 4 256k;
- fastcgi_busy_buffers_size 256k;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement