Advertisement
Guest User

Untitled

a guest
Jun 27th, 2019
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 1.65 KB | None | 0 0
  1. server {
  2.         listen 80;
  3.         server_name test.blabla.com;
  4.         root /var/www/wp01/site;
  5.         index index.php index.html;
  6.  
  7.         location / {
  8.                 try_files $uri $uri/ /index.php$is_args$args;
  9.         }
  10.  
  11.         location ~ \.(jpg|jpeg|svg|png)$ {
  12.                 rewrite ^ /wp01/site$uri break;
  13.                 proxy_pass https://blabla-assets.fra1.digitaloceanspaces.com;
  14.                 proxy_hide_header      Strict-Transport-Security;
  15.                 autoindex on;
  16.                 root /wp01/site;
  17.         }
  18.  
  19.         location ~ \.css$ {
  20.                 rewrite ^ /wp01/site$uri break;
  21.                 proxy_pass https://blabla-assets.fra1.digitaloceanspaces.com;
  22.                 proxy_hide_header Strict-Transport-Security;
  23.                 add_header Content-Type text/css;
  24.                 autoindex on;
  25.                 root /wp01/site;
  26.         }
  27.        
  28.         location ~ \.js$ {
  29.                 rewrite ^ /wp01/site$uri break;
  30.                 proxy_pass https://blabla-assets.fra1.digitaloceanspaces.com;
  31.                 proxy_hide_header Strict-Transport-Security;
  32.                 add_header Content-Type application/javascript;
  33.                 autoindex on;
  34.                 root /wp01/site;
  35.         }
  36.  
  37.         location ~* \.php$ {
  38.                 fastcgi_split_path_info ^(.+\.php)(/.+)$;
  39.                 fastcgi_pass XX.XX.XX.XX:9100;
  40.                 fastcgi_index index.php;
  41.                 include fastcgi_params;
  42.                 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  43.                 fastcgi_param PATH_INFO $fastcgi_path_info;
  44.                 fastcgi_intercept_errors on;
  45.  
  46.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement