1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Symfony on Plesk, Do we need to move document root?

Discussion in 'Apache' started by elklabone, Oct 12, 2007.

  1. #1
    We have a programmer working on an overhaul of one of our sites.

    He's using PHP/Mysql for development with the Symfony framework.

    Default document root is:
    /var/www/vhosts/domain.com/httpdocs/

    Programmer wants to install symfony like so:
    +httpdocs/web/index.php
    +httpdocs/apps
    +httpdocs/batch
    +httpdocs/cache
    -httpdocs/config
    +httpdocs/data
    +httpdoc/doc

    ...where /web/ is document root for site. Programmer is asking host to change document root from /httpdocs/ to /httpdocs/web/ and web host is suggesting against this.

    I would prefer to go with web host's recommendation and leave document tree unchanged if possible.

    Could we fix this with mod_rewrite and leave document root unchanged? Anyone else encountered a similar issue? What's the best way to resolve this? Thanks in advance!
     
    elklabone, Oct 12, 2007 IP
  2. Ladadadada

    Ladadadada Peon

    Messages:
    382
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    0
    #2
    We use symfony for all of our new websites these days and what your programmer is recommending is generally the best idea.

    Based on the path you mentioned above, you can achieve what he wants without changing your document root. Just move all of his files up one directory and create a symlink called "web" pointing to "httpdocs".

    This means that inside /var/www/vhosts/domain.com/ you would have

    apps/
    batch/
    cache/
    config/
    data/
    doc/
    httpdocs/index.php
    web -> httpdocs/
    Code (markup):
    You can keep your code/config info/data out of the documentroot and just put the front controller and your static files (css, images, js) inside the documentroot.

    Everybody wins. :)
     
    Ladadadada, Oct 14, 2007 IP
    elklabone likes this.
  3. stigm

    stigm Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    That is fine for old versions of Plesk, but my host is running Plesk 8 and open_basedir restrictions are in effect...

    I have done research around this problem and found a solution provided you have SSH into the machine.

    I have put my findings up on my blog at http://www.sdm.co.nz/running-symfony-on-plesk/ if anyone is interested. Symfony does work fine on Plesk!

    -Stig
     
    stigm, Apr 3, 2009 IP