The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

suPHP htdocs

Discussion in 'General Discussion' started by Mysteerie, Oct 20, 2007.

  1. Mysteerie

    Mysteerie Well-Known Member

    Joined:
    Dec 29, 2003
    Messages:
    129
    Likes Received:
    0
    Trophy Points:
    16
    When I try and use php files (primarly phpinfo) in the default document root of apache for the main shared ip (/usr/local/apache/htdocs) I get an 500 error. I tried different chmod's differently.

    However, I havn't edit the virtualhost (since I am currently having a problem saving virtual host configurations for the root virtualhost).

    Anyone have suggestions to get php working in htdocs with suphp? I am guessing the problem lies because php isn't running under a user? Though I am a bit stuck here and await hopefully some help will come.
     
  2. closet geek

    closet geek Well-Known Member

    Joined:
    Mar 19, 2004
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Chown the file owner to apache and add this to your VirtualHost entry:

    <IfModule mod_suphp.c>
    suPHP_UserGroup apache apache
    </IfModule>
     
    #2 closet geek, Oct 31, 2007
    Last edited: Oct 31, 2007
  3. vincentg

    vincentg Well-Known Member

    Joined:
    May 12, 2004
    Messages:
    140
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    new york
    I have the same problem and apache as the owner is an error.

    Vin
     
  4. vincentg

    vincentg Well-Known Member

    Joined:
    May 12, 2004
    Messages:
    140
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    new york
    What you can do is set it to a owner of a website / account you own on the server

    That works.
     
  5. closet geek

    closet geek Well-Known Member

    Joined:
    Mar 19, 2004
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Sure, the user apache was just an example really!
     
  6. vincentg

    vincentg Well-Known Member

    Joined:
    May 12, 2004
    Messages:
    140
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    new york
    I assumed you were suggesting httpd

    When one says apache I think httpd which is a user.

    I have one server that no matter what I look at or do it will not work.
    Modernbill will not run nor will any user for htdocs.

    All folder permissions are correct and all file permissions are correct.

    Yet neither a php script in htdocs or Modernbill which is installed in my account will run.

    Had to remove it and we are back up running for both.

    http://newage.dns-safe.com/Info/

    Can it be due to CentOS ?
    My other servers are Fedora and no problems with those.

    I am planning on scraping CentOS soon so it's not a big problem.
     
  7. darren.nolan

    darren.nolan Well-Known Member

    Joined:
    Oct 4, 2007
    Messages:
    259
    Likes Received:
    0
    Trophy Points:
    16
    I'm a happy user of CentOS, no troubles on our end.
     
Loading...

Share This Page