Not sure how to change DocumentRoot

Hi, I need some help to get my Laravel working in my Linode Ubuntu instances. The Laravel framework requires the virtual host to be pointed to the 'public' folder. The Linode group had set up my server for me and below is what I see in the .conf file.

root@www1:/etc/apache2/sites-available$ vim secure.mydomain.com.conf

Use phpfpm user1 secure.mydomain.com 11003

There is only one line inside the .conf file in the '/etc/apache2/sites-available' folder. The above line in the conf file works fine if I put an index.php file inside the /home/user1/secure.mydomain.com folder.

However, when I change the file to add the DocumentRoot so that it will point to the 'public' folder inside, nothing works:

root@www1:/etc/apache2/sites-available$ vim secure.mydomain.com.conf

Use phpfpm user1 secure.mydomain.com 11003

DocumentRoot /home/user1/secure.mydomain.com/public

I am not sure how to get it pointed to the 'public' folder for this specific virtual host… Any help will be greatly appreciated. Thanks!

0 Replies

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct