Advertisement
dimti

Конфиг nginx для WP

Jun 12th, 2016
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. server {
  2. listen *:80;
  3. server_name iontecs.local;
  4. root /var/www/iontecs;
  5.  
  6. index index.php;
  7.  
  8. location / {
  9. try_files $uri $uri/ /index.php?$args;
  10. }
  11.  
  12. rewrite /wp-admin$ $scheme://$host$uri/ permanent;
  13.  
  14. location ~* /(.*\.pdf) {
  15. types { application/octet-stream .pdf; }
  16. default_type application/octet-stream;
  17. }
  18.  
  19. location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
  20. access_log off; log_not_found off; expires max;
  21. }
  22.  
  23. location ~ [^/]\.php(/|$) {
  24. fastcgi_split_path_info ^(.+?\.php)(/.*)$;
  25. if (!-f $document_root$fastcgi_script_name) {
  26. return 404;
  27. }
  28. include fastcgi.conf;
  29. fastcgi_buffers 16 16k;
  30. fastcgi_buffer_size 32k;
  31. fastcgi_index index.php;
  32. fastcgi_pass unix:/run/php56-fpm/php-fpm.sock;
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement