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



17 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 information written in the article is descriptive and well written.It is also simple to read and understand.Good Read.
    web design dubai

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

    ReplyDelete
    Replies
    1. An important building block of SEO is to develop your website which can be easily understandable for both Online Visitors (most important) and search engine robots. In the current digital age, seo is important for your online success means to generate leads.

      SEO Services in IndiaSEO Company in India SEO Company in India SEO Services in India

      SEO Company in India SEO Services in India

      Delete
  7. 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
  8. 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- Engineering colleges in vadodara

    ReplyDelete
  9. 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
  10. Thanks for sharing as it is an excellent post would love to read your future post -for more knowledge- link seo services in india

    ReplyDelete
  11. 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
  12. 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
  13. 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
  14. Such a prolong post require a good understanding and in depth study.for more knowledge- send sms from pc

    ReplyDelete
  15. 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