Advertisement
matriphe

WordPress Multisite Basic (Minimal) Nginx config

Feb 24th, 2014
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. server {
  2. #listen 80 default_server;
  3. server_name _;
  4.  
  5. access_log /var/log/nginx/access.log;
  6. error_log /var/log/nginx/error.log;
  7.  
  8. #-- change this
  9. root /var/www/html/wordpress;
  10. index index.php index.html index.htm;
  11.  
  12. location ~ ^/files/(.*)$ {
  13. try_files /wp-content/blogs.dir/$blogid/$uri /wp-includes/ms-files.php?file=$1;
  14. access_log off;
  15. log_not_found off;
  16. expires max;
  17. }
  18.  
  19. location / {
  20. try_files $uri $uri/ /index.php?$args;
  21. }
  22.  
  23. location ~ \.php$ {
  24. try_files $uri /index.php;
  25.  
  26. #-- using PHP-FPM socket
  27. fastcgi_pass unix:/var/run/php5-fpm.sock;
  28.  
  29. #-- using CGI
  30. #fastcgi_pass 127.0.0.1:9000;
  31.  
  32. fastcgi_index index.php;
  33. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  34. include fastcgi_params;
  35. }
  36.  
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement