Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- server_name my-domain.com;
- root /home/jashka/sites/example/public;
- index index.php;
- error_log /home/jashka/sites/GlobalAppError.log;
- location / {
- try_files $uri $uri/ /index.php$is_args$args;
- }
- location ^~ /test-api {
- root /home/jashka/sites/TestWebServiceAPI/public;
- try_files $uri $uri/ @testapi;
- index index.php;
- location ~ \.php {
- try_files $uri /index.php =404;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_split_path_info ^(.+\.php)(.*)$;
- fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
- include fastcgi_params;
- }
- }
- location @testapi {
- rewrite /test-api/(.*)$ /test-api/index.php last; #index.php?$1
- }
- location ~ .php$ {
- try_files $uri /index.php =404;
- fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement