server { listen 80 default_server; server_name localhost ; root "C:/laragon/www/"; index index.html index.htm index.php; # Access Restrictions allow 127.0.0.1; deny all; include "C:/laragon/etc/nginx/alias/*.conf"; location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass php_upstream; #fastcgi_pass unix:/run/php/php7.0-fpm.sock; } location ~ ^/api/public/(.*)$ { root /var/www/html; fastcgi_pass php_upstream; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; try_files $uri $uri/ =500; rewrite ^/api/public/(.*)$ /api/public/index.php?$1; } charset utf-8; location = /favicon.ico { access_log off; log_not_found off; } location = /robots.txt { access_log off; log_not_found off; } location ~ /\.ht { deny all; } }