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.

Possible to "turn off" php/cgi for an account?

Discussion in 'General Discussion' started by electric, Mar 13, 2006.

  1. electric

    electric Well-Known Member

    Joined:
    Nov 5, 2001
    Messages:
    697
    Likes Received:
    1
    Trophy Points:
    18
    Is this possible?

    I know we can enable/disable CGI (perl), but is there a way to totally disable a domain from running ANY server-side scripts?

    ie: They should be able to run ONLY .html and not:

    .php
    .shtml
    .asp
    .cgi
    .pl
    ..or whatever else..

    Thanks!
     
  2. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    Your httpd.conf specifies how to handle certain file types.

    Based on this, I suppose it's possible to override such directives in local .htaccess files.

    If this is possible, you'd then have to overcome the problem of users modifying such .htaccess files. They'd need to be readable by Apache and then, by association, by everyone else, however they wouldn't need to be writable by anyone - would permissions of 0444 work?
     
  3. electric

    electric Well-Known Member

    Joined:
    Nov 5, 2001
    Messages:
    697
    Likes Received:
    1
    Trophy Points:
    18
    Can this be done programmatically when creating the account?

    ie: I want to set up a basic WHM plan that does NOT allow php/cgi

    Any ideas?
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    It's certainly possible. You'd have to do some coding using the /scripts/postwwwacct script which you would have to create and code yourself.
     
Loading...

Share This Page