Question

Install Laravel5 side by side with October cms

Posted April 1, 2015 3.4k views
UbuntuApacheConfiguration Management

I’d like to know if it is possible and if so how to have OctoberCMS (which is built on Laravel) and Laravel5 installed to the same domain but the different installs served by different urls.

I’ll try and explain
OctoberCMS - this is the public facing website and back-end CMS for the website
Laravel App - this is my in house developed office management and client area app

I have my virtual host set up and the website/October is accessible and all routes work ok

mydomain.com/* -> public_html = October CMS - which will serve whichever pages are on the website e.g mydomain.com/about etc.

There 2 routes which I want handled by my Laravel app

mydomain.com/office/* -> public_html/office/public = Laravel app
mydomain.com/client/* -> public_html/office/public = Laravel app

How do I go about setting my virtual host or .htaccess to make this happen

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
3 answers

On the Apache side, the configuration is pretty simple. You just need to set up an Alias directive to point to the Larevel app that will be served from the sub-folder. It would looks something like this:

<VirtualHost *:80>
    ServerName mysite.com

    DocumentRoot /var/www/public_html/client/public/

    Alias /office /var/www/public_html/office/public/
</VirtualHost>

Thanks, I’ll give it a try.

Will this directive take precedence over the .htaccess file in /var/www/public_html/client/public/

You can try Microweber CMS. It is on Laravel 5 too

Submit an Answer