I created a route file with the following structure:
Route::group(['domain' => '46.101.255.245', 'namespace' => 'API'], function() {
Route::group(['prefix' => 'v1', 'namespace' => 'v1'], function() {
Route::get('/aeds', 'APIAEDController@index');
});
});
and a controller containing the method:
public function index() {
return "OK";
}
When I call the address:
46.101.255.245/v1/aeds
I get a 404. On my local machine the same code runs smoothly. Do I need to change the route file?
The NGINX config:
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /var/www/mfserver/public/;
index index.php index.html index.htm;
server_name 46.101.255.245;
location / {
try_files $uri $uri/ =404;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
try_files $uri $uri/ /index.php$is_args$args;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
When I just call the server IP I at least get the routing error which tells me, that laravel is working.