Welcome, Guest
Please Login or Register.
Lost Password?
running php outside of cgi (1 viewing)
Post Reply

TOPIC: running php outside of cgi

#4216
hescominsoon (User)
Posts: 70
graphgraph
running php outside of cgi 2007/03/17 08:01  
Simply for performance. Can you guys implement this and stil keep it secure? Running it as a cgi introduces a performance hit which is the reason so many folks are using things like php, ruby..etc etc.
  The administrator has disabled public write access.
#4218
Joe (Admin)
Posts: 4213
graph
Re: running php outside of cgi 2007/03/17 13:58  
Hey William,

We've begun the move to mod_fcgid, which will solve this problem for the vast majority of scripts (PHP runs unmodified under fcgid, Ruby on Rails apps generally run under it fine, and most popular/modern Perl scripts do too).

Virtualmin already has all of the support in place, but not all platforms have the required software in the repository. It also doesn't cover all script types yet--it's not safe to assume that all apps in any language other than PHP can use the FastCGI interface, so we're figuring out how to do it on a per-script basis as we go along.

If you're on any of the recent Fedoras, RHEL 4, CentOS 4, or Ubuntu, I believe you can use those features now. (It also, incidentally, allows use of PHP4 and PHP5 simultaneously in the same Apache.)

For Fedora and RHEL/CentOS:

yum install mod_fcgid

And optionally install the PHP version that didn't come stock with your system, if you want to be able to run all PHP scripts.

For Ubuntu:

apt-get install libapache2-mod-fcgid

It also has both PHP versions available for install from the Universe repository.

Finally, you can switch Virtualmin's "Default PHP exection mode" in the Apache website section of your Server Template(s) to "FCGId (run as virtual server owner)".

For existing domains, select the domain and browse to "Server configuration" "Website options" and select: "FCGId (run as virtual server owner)" in the PHP scripts section.

  The administrator has disabled public write access.
Post Reply
get the latest posts directly to your desktop

Talk and Get Help

Support
Forums
Bugs and Issues

Get Virtualmin

OS Support
Buy Online
Download
Copyright 2005-2007 Virtualmin, Inc. All rights reserved.