You use virtualhosts for that.
multiple laravel in subdirectory
Hi how to config lemp server for multiple laravel in subdirectory?
exemple.com/blog1 exemple.com/blog2
each blog are instance from laravel
regards
if you are using apache, theres a similar process https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-16-04
Yes, it may help Regards https://mybk-experience.onl/
not really, both links related to setup new domain for each subfolder. ie toto.com and titit.com
but in my case, i only need toto.com/blog1 and toto.com/blog2
i think, need change on laravel only.
if you are limited by owning a single domain then perhaps you could look at using subdomains
eg toto.com/blog1 redirects to blog1.toto.com and a similar arrangement for your blog2.
it might be possible to put your codebase outside of public_html and then rename /public to blog1 but this is a fiddly way of dealing with this.
i'd be considering what makes blog1 and blog2 different and how extendable this would be if you were bringing in blog3.
if you 2 blogs are 2 people blogging on the same domain then that's perfectly easy to do in a single install of Laravel.
because i will need to make blog200 ... then i wish not have to manage DNS. But only duplicate project and start to develop.
i'm hosting with a domain handled by cpanel and it is very easy to add subdomains.
My current Laravel projects are side by side in a single directory and I have subdomains set to serve each site as a separate site and that will make going to production much simpler.
Whilst I don't doubt you cant achieve what you're trying to do by serving side by side in the same webroot, you are making it difficult to go to live with your individual blogs.
whats the difference between blog1 and blog2? are they different categories or different customers?
HI, i try it. https://github.com/lucabecchetti/laravel_subdir
@sylvain92 ah cool. glad you found a way.
Please or to participate in this conversation.