WebFaction
Community site: login faq
0
1

I'm deploying a laravel application and although I have done this many times before there is always one thing that bugged me a little.

The laravel directory structure is default as follows:

  • /app
  • /public
  • /vendor
  • some_file_1
  • some_file_2

the public directory is where the actual index.php resides that needs to be served together with a .htaccess file. This directory structure is great and makes sense.

When deploying the app to webfaction I have to move some files and directories around to make it all work. Although this isn't a problem on my dev server I just setup the documentroot so it points to application/public directory.

Can I change the documentroot or is there another way to serve up /application/public without changing moving around said files and directories?

asked 01 Dec '13, 10:51

Clooner
51412
accept rate: 0%


The recommended way is to create a Symbolic Link application. Once you install your laravel application you would then create a new Symbolic Link application via the Control Panel and put the following in the Extra Info while creating it.

/home/username/webapps/laravelapplicationname/public/

You would then mount your new symbolic app at / for your website. Please make sure you replace the username and application name as that can not be edited after it is created.

In regards to setting a Document Root our Documentation covers that

permanent link

answered 01 Dec '13, 11:25

aaront ♦♦
7664
accept rate: 27%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×19
×15
×6
×2

question asked: 01 Dec '13, 10:51

question was seen: 6,088 times

last updated: 01 Dec '13, 11:25

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM