External Application config through Apache Config

Discussion in 'Apache Migration/Compatibility' started by anything, Jul 9, 2013.

  1. anything

    anything Member

    I'd like to know how to change the external app config per virtualhost via the Apache config.
    Specifically, I want to change the Memory Soft Limit and Memory Hard Limit for a specific virtualhost's php lsapi to a very high number, and keep it the default for all the others.

    I realize I could probably add another special external app and change the php handler for that site.
    but i want to avoid this solution, for fear that any user clever could work out how to do it (its a shared hosting environment)

    I also attempted to use RLimitMEM to no avail

    I've also tried searching for a list of all the compatible directives that can be used in apache config, but couldnt find anything.

    any hints?


    Also, as im using php suExec id also like the ability to change the PHP suEXEC Max Conn option per vhost also.
    for example, all sites have max 5, except one that is allowed 10.
    Last edited: Jul 9, 2013
  2. NiteWave

    NiteWave Administrator

  3. anything

    anything Member

    it doesnt work

    I tried using "DisableCgiOverride On" in the apache conf and in a test vhost, but i can still override the handler in a simple .htaccess file.
    I even tried it in "Apache Style configurations" under configuration -> server

    AddType application/x-httpd-php53_highmem php
    works every time

    lsws enterprise 4.2.3
  4. webizen

    webizen New Member

    DisableCgiOverride is to prevent user from overriding cgi handler via .htaccess. What you want to do is not allowing other user (once they figure out) to use the special php handler. In shared hosting, it is not possible to dedicate that handler once it is available. Plus, there is no way to change suEXEC max connections for just one particular vhost. All vhosts have the same suEXEC max conn settings.

    You can try cloudlinux(cagefs) to allocate more resource for that particular account. just make sure settings in lsws not exceed CL limit for that account.
  5. anything

    anything Member

    i wanted to test if it works, and it seemed to apply no restriction at all.
    i was able to change the php handler via .htaccess on any vhost no matter where i placed DisableCgiOverride.

    suggest considering adding it? it would be convenient to be able to change everything via apache conf
    we have a small cluster of loadbalanced servers for shared hosting, rather than lots of separate individual servers (it seems much faster overall). but it would be good to be able to allocate some sites more resources than others.

    ill have to take a look
    the idea of more overheads is a detractor, i already hate php's wastefulness ;)

Share This Page