WebFaction
Community site: login faq
0
1

On other servers when setting up websites for, I've typically setup the folders as follows:

 - httpdroot 
 -+ app1
    -+ docs     // actual apache document root for app1
      -+ images
      -+ scripts
      -+ css
    -+ includes    // php includes folder - not inside app1 document root
    -+ logs

On webfaction, these are scattered, at least the log files are completely separate and it took me a while to find them. I try to put my includes folders elsewhere for security reasons, but this makes it hard to manage because everything gets scattered.

It's especially a nuisance when I try to use Git to manage and deploy sites - unless I put everything in the same folder.

What does everybody else do here? Just put the includes folders into the document tree and rely on .htaccess directives to keep people out of them? Is there something I missed in the control panel that would let me force the document root to be ~/webapps/app1/docs/ instead of ~/webapps/app1 ?

asked 10 Nov '11, 17:05

Arunas
1527
accept rate: 0%


Yes, believe what you are looking for is exactly the the Symbolic Link to Static/CGI/PHP application. It works exactly like a standard Static/CGI/PHP application except that you can specify the document root as a full path to anywhere in your home directory. This was designed to be used exactly as you are intending.

Integrating updates with Git is also compatible with this configuration. More information on using git to manage updates to an application is available here. Hope that helps!

permanent link

answered 10 Nov '11, 18:22

ryans ♦♦
5.0k93360
accept rate: 43%

Aha! That looks like it will do it. Thanks!

(11 Nov '11, 13:19) Arunas

Aha! That looks like it will do the trick! Thanks!

(11 Nov '11, 13:20) Arunas

The only issue with this solution is that there's no way (currently) to change the symbolic link. So if you want to reorganize your folders, you end up deleting and recreating application entries, and then hooking them up again in your website entry. Otherwise this is exactly the solution that does what I wanted (apart from the log files, which may be solved with a few symbolic links).

(09 Dec '11, 15:13) Arunas
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:

×262
×24
×2

question asked: 10 Nov '11, 17:05

question was seen: 3,906 times

last updated: 09 Dec '11, 15:13

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