How to set up a subfolder for laravel projects on 1 domain

I have a configuration

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 { alias /home/jashka/sites/TestWebServiceAPI/public; try_files $uri $uri/ @testapi; location ~ \.php { try_files $uri /index.php =404; 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?$1 last; } 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; } } 

My-domain.com/test-api does not work exactly a blank screen Such a response code

 HTTP/1.1 200 OK Server: nginx Date: Tue, 12 Jul 2016 16:51:02 GMT Content-Type: text/html; charset=UTF-8 Transfer-Encoding: chunked Connection: keep-alive Content-Encoding: gzip 
  • make sure that this request is interpreted exactly /home/jashka/sites/TestWebServiceAPI/public/index.php - aleksandr barakin
  • in the headers there is clearly no display about PHP, and I also ruled the file /home/jashka/sites/TestWebServiceAPI/public/index.php to find out if it is being executed, and as it turned out, the query does not occur - jashka
  • so test further. comment out the entire section of the location ^~ /test-api , check what happens, then uncomment, but comment out the section of location ~ \.php , etc. inside it. etc. // and understand what is happening with you. - aleksandr barakin

0