Search This Blog

Wednesday, January 30, 2013

Configuring Symfony 2 with a Cpanel hosted site.

This post by at weblincs is useful - symfony-framework-cPanel-shared-hosting, however it is for Symfony 1.x.
As it states is best to use symbolic links to avoid any custom httpd config file configuration causing problems with Cpanel.
The Symfony 2 configuration is even simpler (I believe this is related to the configuration from Symfony v1 to v2) I did the following:

  1. Upload your symfony application.
  2. Extract it into a new folder -eg  /home/user/symfony_site, on a standared cPanel site this will be the same level as the public_html folder.
  3. Remove or rename the public_html folder.
    mv public_html public_html_original
  4. Create a new symbolic link linking public_html to the symfony web folder:
    ln -s symfony_site/web public_html
  5. Check the folder permissions - apache will warn in the log file if there is group write permission:
    chmod g-w symfony_site/web
    chmod g-w public_html
  6. Restart Apache (see reference at etwiki.cpanel.net):
    /usr/local/cpanel/scripts/restartsrv  httpd 
  7. check the permissions of app/cache and app/logs, clear the symfony cache.
One tip - if not using a source code control, this query will list modified files since a timestamp file on the top directory.


find . -newer LAST_UPLOAD -type f -o -path ./app/cache -prune -type f



14 comments:

  1. I am very thankful to the author to write this fruitful information.It is worth sharing for other users.Thanks once again for more knowledge- https://www.facebook.com/hiremagentodeveloper

    ReplyDelete
  2. I am very thankful to the author to write this fruitful information.It is worth sharing for other users.Thanks once again for more knowledge- web design orlando

    ReplyDelete
  3. I am very thankful to the author to write this fruitful information.It is worth sharing for other users.Thanks once again for more knowledge- website design dubai

    ReplyDelete
  4. I just like the post shared and it would be worth when we see people giving their valuable feedback which motivates the author.Thanks for sharing. for more knowledge- Jogging track

    ReplyDelete
  5. The article is good to read and worth sharing for more knowledge- coaching classes in vadodara

    ReplyDelete
  6. I just like the post shared and it would be worth when we see people giving their valuable feedback which motivates the author.Thanks for sharing.for more knowledge
    seo in philippines

    ReplyDelete
  7. I've read several just right stuff here. Definitely price bookmarking for revisiting. I wonder how much effort you put to create any such wonderful informative website.
    link seo in New Zealand

    ReplyDelete
  8. My brother recommended I may like this website. He used to be entirely right. This submit truly made my day. You can not believe simply how so much time I had spent for this info! Thanks!
    link seo services uk

    ReplyDelete
  9. You must look for a person that has a lot of experience in web designing. Try to make sure that they possessed the skills that you're looking for. There are many Magento Designers but there are only quite few that really has talents.
    link seo in new zealand

    ReplyDelete
  10. I just like the post shared and it would be worth when we see people giving their valuable feedback which motivates the author.Thanks for sharing.for more knowledge- link seo services in usa

    ReplyDelete
  11. Such a prolong post require a good understanding and in depth study.for more knowledge- send sms from pc

    ReplyDelete
  12. The article is well written from a qualified in the industry. It is very interesting for more knowledge- link seo services in south africa

    ReplyDelete