0
votes

I have built a base laravel site with authorization using nginx as the web server.
Then I have created another laravel instance under the main directory in the original site and added a simple index.html page for testing.

I created a server block in sites-available for the default site and another for he subdomain.
I created a symlink in sites-enabled and when I run 'curl sub.domain.com it resolves the index.html page on the second laravel instance.

When I try this from the browser it does not resolve.
I made an entry in the hosts file '127.0.0.1 domain.com sub.domain.com' I also tried 'DNS IP Address sub.domain.com'

In the routes file I tried the suggested code from Laravel

Route::group(['domain' => '{sub}.domain.com'], function () {
  Route::get('/', function ($sub) {
    return $sub;
    });
});

To make the site more manageable I wanted to utilize the sites-avialable/sites-enbaled functionality of Nginx. Being able to take a subdomain offline for updates and not affecting the core site and other subs.

1
<b>Solved it!!!</b><br> solved it at the nguni server level using sites-available and sites-enabled. DNS entries where not resolving.Steve Creekmore

1 Answers

0
votes

Solved it!!!
solved it at the nginx server level using sites-available and sites-enabled. DNS entries where not resolving.