WPS2
3 years ago
147
32
Laravel

Laravel Deployment

Posted 3 years ago by WPS2

Hi Guys,

I have couple of projects that I am planning to deploy on amazon ec2 cloud server. As i have two projects, i cannot make the laravel "public" folder the root directory in the settings. is there a better way to deploy 2 laravel projects on same web server?

I am going to deploy on apache web server ( LAMP server ) on ubuntu 14.04. what is the best web server to deploy laravel project? is Nginx better then Apache?

updating the post : for the testing purposes i am deploying this on ubuntu server running on a virtual box. i have created the following virtual host.

<VirtualHost *:80>
        ServerName 192.168.0.6
        DocumentRoot /var/www/html/mysite/public

        <Directory /var/www/html/mysite/public>
            AllowOverride All
            Require all granted
        </Directory>
</VirtualHost>

and granted the permission using following.

sudo chmod 777 -R mysite/
sudo chmod 777 -R mysite/*

now i can access the site from my local machine with http://192.168.0.6/mysite/public/ url, but the css,img,js does not load correctly. it's looking for the css,js and img in http://192.168.0.6/ location instead of http://192.168.0.6/mysite/public/

appreciate any help

Thanks

Please sign in or create an account to participate in this conversation.