3

I read and tried several methods and none worked. I always get either 400 or 500 error. The app works perfectly on localhost.

What are the exact steps in order to get Laravel 5 up and running on a VPS with DirectAdmin CP??

Please don't link to other questions as I read them all. Some don't even work with Laravel 5 anymore.

Note: DirectAdmin sees public_html as the document root.

I have SSH root access and Composer is installed.

VPS Configs: Apache 2.4.9 and PHP 7.0.3.

Vahid Amiri
  • 10,769
  • 13
  • 68
  • 113

1 Answers1

5

Turns out DirectAdmin has a section where you can define custom Apache configs (including Document root). So here are the steps:

1- Login to your admin area (as System Admin)

2- From Extra features select Custom Httpd Configurations

3- Select the domain you want to config

4- In the textarea at the top enter the following:

|?DOCROOT=/home/username/domains/example.com/public_html/public|

5- Click save. Now wait for a minute or two and voila! It works.

Obviously you need to change the username and example.com according to your setup.

Read more about this feature.

Vahid Amiri
  • 10,769
  • 13
  • 68
  • 113