Deploying Laravel

Published 5 days ago by mattnewark

Good Morning All,

I am trying to deploy my site on a VPS and I have followed the below guide created by @Snapey so that I am hiding the core code above the public_html folder:

http://novate.co.uk/deploy-laravel-5-on-shared-hosting-from-heart-internet/

The issue that I have now is when I SSH into the folder and try and run the artisan command it doesn't work. I go to the folder core folder and try to run the queue:listen command and it seems to ignore the request. I run php artisan and it doesn't work either, no error.

Can someone please point me in the right direction

Thanks

Best Answer (As Selected By mattnewark)
jdunsmore

I dont like this method of deployment as from past experience there is always small issues that arise and no clear resolution.

What I would do is upload everything into the public_html folder, including Laravels public folder.

Then on your VPS alter the apache2 conf to tell it the sites root is public_html/public

Or your nginx conf. Whichever you are using.

Be sure to revert the index.php to the default path that ships with laravel.

Regards.

jdunsmore

When you are trying to call artisan commands are you in the same directory as the artisan file?

mattnewark

Hi @jdunsmore

Yes I am

jdunsmore

Could you provide a screenshot of your folder structure on your VPS (where your site files are)

And also your public/index.php file.

mattnewark

Hi

So I have all files apart from the public folder above the public_html in a folder called auditstagingcore, I have emptied the public folder contents into a folder called auditstaging below the public_html. I have also changed the index file to point to the new core folder.

Thanks

jdunsmore

I dont like this method of deployment as from past experience there is always small issues that arise and no clear resolution.

What I would do is upload everything into the public_html folder, including Laravels public folder.

Then on your VPS alter the apache2 conf to tell it the sites root is public_html/public

Or your nginx conf. Whichever you are using.

Be sure to revert the index.php to the default path that ships with laravel.

Regards.

mattnewark

@jdunsmore

I have started to upload everything again,

Thanks for your help

jdunsmore

Let us know how you get on.

mattnewark

@jdunsmore,

I have had it working previously with pointing the domain to the public folder so I am just going to revert everything back to what it was..

Thanks

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