I've hit a wall while setting up a new localhost on windows 8. The setup was done with laragon (3.0.5) and is comprised of:
- php 7.1.5
- laravel 5.4.24
- nginx 1.12.0
The config file for nginx is
server {
listen 8080;
server_name new_project.dev *.new_project.dev;
root "C:/lar/laragon/www/new_project/dir1/";
index index.html index.htm index.php;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass php_upstream;
#fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
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;
}
}
in routes/web.php I have added the following route
Route::get('/foo', function () {
return 'Everything is awesome!';
});
I would expect when going to http://new_project.dev:8080/dir1/public/foo to see the string "Everything is awesome!", instead i get a 404 from nginx.
Absolutely any help will be more than appreciated.
---- UPDATE 1 ----
Again in routes/web.php there is the following route
Route::get('/', function () {
return 'You are on the home page.';
});
When I go to http://new_project.dev:8080/dir1/public/ I get a 200 and the expected string.