Advertisement
Guest User

nginx php7 magento redirect for admin

a guest
Jan 11th, 2016
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. # Default is to use pool 1
  2. set $custom_php_pool "1";
  3.  
  4. # If is /admin, we use pool 2
  5. if ($uri ~* "^/index.php/admin/") {
  6. set $custom_php_pool "2";
  7. }
  8. if ($uri ~* "^/qbonline/") {
  9. set $custom_php_pool "2";
  10. }
  11. if ($uri ~* "^/api/") {
  12. set $custom_php_pool "1";
  13. }
  14. if ($uri ~* "^/index.php/admin/sales_order_create/") {
  15. set $custom_php_pool "1";
  16. }
  17. if ($uri ~* "^/index.php/admin/sales_order_edit/") {
  18. set $custom_php_pool "1";
  19. }
  20.  
  21. location ~ \.php$ {
  22. if ($custom_php_pool = '1') {
  23. fastcgi_pass unix:/var/run/php5-fpm.sock;
  24. }
  25. if ($custom_php_pool = '2') { fastcgi_pass 127.0.0.1:9007; }
  26. fastcgi_index index.php;
  27. fastcgi_read_timeout 600;
  28. include fastcgi_params;
  29.  
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement