Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

kamdjou's avatar

How to deploy laravel 5.1 on HostMonster VPS Server?

I have follow these instructions to deploy my fresh Laravel 5.1 App on Hostmonster VPS server But getting Server error 500

-I have created a directory at the root level called laravelCore/ and upload all the content of the my laravel app execpt the puplic/ directory
-After that i uploaded the content of the public folder in the public_html/ directory of the server -Then modified these two lines of the index.php file under the directory as follow require DIR.'/../laravelCore/bootstrap/autoload.php'; $app = require_once DIR.'/../larvelCore/bootstrap/app.php'; -Then i change the permission of the strore/ directory to 777 But getting server error 500 here is the link to the demo http://www.nypcm.com/UI/public/index.php

0 likes
5 replies
Snapey's avatar

If you do those things, public should not be present in the url, but when I go to http://www.nypcm.com it redirects me to UI/public/index.php

have you earlier tried messing with .htaccess ?

kamdjou's avatar

Hi @Snapey thanks for checking the url. I actually did some modifications on the index.php but now I have fixed them and I am still getting the same server error 500. I didn't modified the .htaccess file, by the way I don't even know where it is found. Please I can help me?

bashy's avatar

Check the error that gets entered into the log file. Should come back with something to guide you in the right direction.

What did you change in your index.php file? Shouldn't really have to...

Snapey's avatar

Assuming its Apache...

you should have a file in your public folder called .htaccess . It is this file that is responsible for directing all requests to your index.php file which then bootstraps the application and ultimately ends up at the router.php where what you entered in the browser is compared to the known routes.

The installer should cover the creation of the file.

Your operating system might hide the file from you. Files that start with a period are hidden by default on unix or osx

Please or to participate in this conversation.