By Hunnie
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
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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/
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.