Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. server {
  2. listen 80 default_server;
  3. listen [::]:80 default_server;
  4.  
  5. root /var/www/top/public;
  6.  
  7. index index.html index.htm index.php;
  8.  
  9. server_name _;
  10.  
  11. location / {
  12. try_files $uri $uri/ /index.php$is_args$args;
  13. }
  14.  
  15. location /nested {
  16. alias /var/www/nested/public;
  17. try_files $uri $uri/ @nested;
  18.  
  19. location ~ \.php$ {
  20. include snippets/fastcgi-php.conf;
  21. fastcgi_param SCRIPT_FILENAME $request_filename;
  22. fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
  23. }
  24. }
  25.  
  26. location @nested {
  27. rewrite /nested/(.*)$ /nested/index.php?/$1 last;
  28. }
  29.  
  30. location ~ \.php$ {
  31. include snippets/fastcgi-php.conf;
  32. fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement