virtualhost configuration on centos6 vps for a symfony2 project failing with 500 error

489 views Asked by At

I have a VPS running Centos6 (although if my luck so far carries on I might throw it out of the window!). I am trying to get a small symfony2 project up and running but Im bashing against this error message in the server logs. There are other non-framework based sites running successfully on the server although non require a vhost.

    no user or group set - set suphp_usergroup

I have added a virtualhost entry as follows:

<VirtualHost *:80>
    ServerName adomain.com
    ServerAdmin [email protected]
    ServerAlias www.adomain.com
    DocumentRoot /home/username/public_html/web

    # I added this after digging around to no avail
    <IfModule mod_suphp.c>
           suPHP_Engine On
           suPHP_UserGroup username username
   </IfModule>
   ######
    <Directory /home/username/public_html/web>
            Options -Indexes +FollowSymLinks
            AllowOverride All
            Order allow,deny
            Allow from ALL
    </Directory>
    ErrorLog /home/username/logs/adomain_com.log
    CustomLog /home/username/logs/adomain_com_access.log combined
</VirtualHost>

Ive read through this and to be honest not a lot makes sense. suphp is installed on the vps 'out of the box' so I dont have the experience of setting it up.

I would be grateful if someone could help me to debug this error message.

Nearly forgot to say, the application runs sweetly on my home linux dev server.

Thanks for looking.

2

There are 2 answers

0
DevDonkey On BEST ANSWER

Turns out it was a conflict with cPanel. I'd been going about trying to change the document root all wrong. I didn't need to configure a vhost manually. In /var/cpanel/user data there's a username folder with a domain configuration file. It was asmall simple as changing it in there, then running /var/cpanel/scripts/rebuildhttpdconfig to have cpanel build httpd conf manualy.

0
Max Lipsky On

First, look at the logs in app/logs

Some reasons for this error:

  • Error in .htaccess
  • Permissions on /web folder are not correct (also check permissions for app/cache/* folder)

More information http://symfony.com/doc/current/book/installation.html