4 months ago I created App1 which included wildcard subdomain routing. This is my host file. As you can see the old app is commented out.
My host file:
192.168.10.10 testme.ss5.app
192.168.10.10 ss5.app
Now when i go to ss5.app it works fine. When i go to testme,ss5.app I get a 404 from nginx.
Now my old app (App1) was working and when the code was running on it, it went straight to that site no problem. Do i need to configure something in ngix?
Not even this code works which worked on my old app.
Route::group(['domain' => '{subDomain}.ss5.app'], function()
{
Route::get('/', function($subDomain) {
return $subDomain;
});
server {
listen 80;
server_name mvp.app;
root /home/vagrant/Code/ss5/public/;
index index.html index.htm index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
access_log off;
error_log /var/log/nginx/mvp.app-error.log error;
error_page 404 /index.php;
sendfile off;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
"ss5.app" [readonly] 39L, 916C 1,1
Thank you
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community