Bump.
Basically, have a full Laravel install at example.com and then a Lumen install at api.example.com, and have it run from Forge.
Hello.
Is it possible to have a normal laravel application running on forge and then add a subdomain which runs lumen?
Bump.
Basically, have a full Laravel install at example.com and then a Lumen install at api.example.com, and have it run from Forge.
Have you tried it? It's perfectly possible...
I haven't tried it as I am not entirely sure how to do it, I haven't had much luck with Subdomains in Laravel nor do I have any idea how to do it in Forge. @bashy
edit: I'd be extremely happy for some help, I've been wresteling with it for two hours now without really knowing what to do about it. I have my domain at Namecheap.
Again, thank you very much.
Okay well firstly, I don't use Forge but I know how to do it in Nginx. You add a site into Forge and it allows you to use a subdomain as the domain?
Yes, it allows me enter a subdomain as the domain @bashy.
I am blank on how to set it up with Namehcheap and adding Lumen to that subdomain
Okay so once you've added it to Forge (you can check with sudo nano /etc/nginx/sites-available/nameoffile(.conf)
On your DNS, you will need to point an A record to your server's IP. The host would be the subdomain name something.example.com
Yeah, that is done, I am currently waiting for it to update.
If you want to check manually, you can edit your local DNS for that subdomain to point to your IP (if you wish to test before it's propagated)
Oh, that's smart, I never even thought of that. I'll do that tomorrow though, I'll be heading to bed soon since it's half past twelve here.
Tomorrow I'll bring an update, and thank you very much for your help! Hopefully it the DNS works as soon as Namecheap updates it, and then there's just Lumen left.
Cheers.
-JapSeyz
@bashy It seems to work great with the subdomain, now I'll just have to find a way to connect that to Lumen, I am not sure that is possible directly through Forge, since all I have to work with is the web directory which is by default, set to public.
Yeah just point the root directory in the Nginx config (if it's not set properly).
@bashy yeah that's where I am lost, I don't know where I should place the Lumen install and where exactly to point it.
I should place it outside the Laravel install, but then I would have to manually have to go into the Ngix config and change it to the root of the Lumen install correct?
Actually. I can enter a Github / Bitbucket link into each domain / subdomain seperatly, so it shouldn't be a problem at all.
Thank you very much for all your help. I'll test this as soon as I am home
If you've added a new site, you will add it in the new virtual host file for Nginx as you stated. You can put Lumen outside of Laravel, yes (best to do so...).
Please or to participate in this conversation.