Hi Are you running PHP with CGI? If yes, then you can use the <Directory></Directory> directive blocks and the Options Directive to optionally allow or disallow execution of PHP scripts. For example, your basic hosting can have a config: <Directory /var/www/basic> Options -ExecCGI <other options> </Directory>
while for your Hosting package, it can read: <Directory /var/www/Hosting> Options +ExecCGI </Directory> You can check out http://httpd.apache.org/docs/2.2/sections.html for more details. You can further support different versions of PHP for your Legacy and Hosting packages using the AddHandler directive in a similar fashion. Hope this helps you and all the best! Regards Chandranshu On Mon, Jun 29, 2009 at 9:35 PM, Monkey Daemon < monkeywebdae...@googlemail.com> wrote: > 2009/6/29 Mike Cardwell <apache-us...@lists.grepular.com> > > > > Monkey Daemon wrote: > > > >> I'm looking into our options going forward for our web-hosting cluster. > >> > >> We're currently running Zeus Web Server using sub servers. > >> > >> The idea behind webservers is that you can have a directory layout that > looks like: > >> > >> /var/www/%HOSTING-PACKAGE-TYPE%/%x%/%x%/%domain-name.tld/html/ > >> > >> and the webserver does a lookup for the files in the html directory for > each request it recieves. In the above example, that would mean that for > www.icanhazcheezburger.com <http://www.icanhazcheezburger.com> [0] hosted > on a Designer Hosting package, the path would expand to > >> > >> /var/www/DesignerHosting/i/c/icanhazcheezburger.com/html/ < > http://icanhazcheezburger.com/html/> > >> > >> I know that you can do a similar thing with vhosts, however we need to > be able to set different options for each of our hosting packages and I > don't appear to be able to specify the package-type restrictions, just > server wide which is no good for our hosting platform. > >> > >> If someone can point me in the direction of the correct module(s) to use > for this, I'd be very greatful. > > > > I set up a system very similar to what you're describing in a past job. I > used mod_rewrites RewriteMap option with the "prg" MapType. > > > > http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewritemap > > > > iirc we used suphp to make the perl/php scripts run as the owner of the > file. > > > > What differences are there between your different hosting packages that > would require vhost level configuration? Perhaps you could set up one > virtualhost for each hosting package and stick them on different IPs? > > We host over 160,000 sites, I'm not sure if it's a good idea to host > that number across about 4 vhosts (that is the number of hosting > packages we provide!) :) > > The main issue that we face is that vhost_alias does not return the > correct document root as a server variable under PHP and we don't want > to end up with a huge number of mod_reqrite rules just to get the > system running...although I do realise that it may well be a trade-off > here. > > As an example, a file at > /var/www/DesignerHosting/e/x/example.com/html/test.php with a simple > "echo $_SERVER['DOCUMENT_ROOT']" statement in it will echo the > ServerRoot as set in apache2's httpd.conf (or equivalent depending on > Operating System!) instead of the VirtualDocumentRoot which is set to > /var/www/DesignerHosting/%1.1/%1.2/%1+/html and should expand to > /var/www/DesignerHosting/e/x/example.com/html/ (provided the syntax is > correct!) > > The packages work as follows: > > Basic: Static HTML, > Legacy: PHP4/mySQL4 > Hosting: php5/MySQL5 > Designer: php5/Hosting5 but with ability for reselling/sub-domains etc. > > So any site that is hosted on the basic offering needs to have > PHP/MySQL switched off, the others need it switched on and the > Reseller account needs to be able to setup sub domains. > > > > >> [0] Sadly this domain is not hosted with us, but it seemed like a good > example domain to use! > > > > According to RFC 2606 it's best practice to use one of the following > domains when you need examples: > > > > example.com > > example.org > > example.net > > > > See http://www.rfc-editor.org/rfc/rfc2606.txt for more information. > > Duely noted, I'll use this in future. > > Kind regards, > > Matt. > > --------------------------------------------------------------------- > The official User-To-User support forum of the Apache HTTP Server Project. > See <URL:http://httpd.apache.org/userslist.html> for more info. > To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org > " from the digest: users-digest-unsubscr...@httpd.apache.org > For additional commands, e-mail: users-h...@httpd.apache.org > >