WebFaction
Community site: login faq

I have tried to install Symfony2 app, developed on my local box. I've initialized new Static/PHP5 application, and then uploaded everything to webapps/mynewapp.

Symfony apps tend to have DocumentRoot elsewhere, not in the application root directory. Main PHP file is not located webapps/mynewapp, but in webapps/mynewapp/web.

I have tried setting DocumentRoot per instructions found on http://docs.webfaction.com/software/php.html#configuring-document-root - no luck there. If I do stuff only found in the documentation, I still get directory listing instead of the app. If I create new index.php in app root, which includes app's index file (in /web directory), my app starts BUT all of the assets are still located in /web subdirectory (e.g. /web/css instead of /css) and all of the hrefs are broken.

What am I missing?

Thanks, D

asked 09 Nov '11, 04:47

dusandz
823
accept rate: 0%


Hi,

There is no need to set the DOCUMENT_ROOT PHP variable as it won't actually change the DocumentRoot for your site. Instead, you can create a symlink app that points to the directory in symfony that is supposed to be the document root, and mount this symlink app to your site.

Please try this and let us know if you experience any further problems.

permanent link

answered 09 Nov '11, 08:43

todork
1.2k5
accept rate: 34%

That's it, worked like a charm! Thanks!

(09 Nov '11, 12:20) dusandz
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:

×6
×3
×2

question asked: 09 Nov '11, 04:47

question was seen: 2,989 times

last updated: 09 Nov '11, 12:22

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