[HOWTO] mod_ruid2

Well, the problem is that cms's use to define paths and url from the url where you are connected from, so some cms would get missconfigurated...

If a user wanna test website and install cms before dns propagation, the hosts files would be for sure the more safe and secure edit for make a nice installation.

Regards
 
I've disabled the ~/user access. Since mod_ruid2 just doesn't work there it differs from the normal environment you offer, thus a source of confusion and error.

If you install a CMS which binds the hostname, then yes the hosts file would be best if you can't wait. But if someone wants to access it through ip/~user that story doesn't apply (unless they are unaware of the CMS).

Personally I like the solution where customers just make an alias pointer of another domain (a e.g. somewebsite.customerid.customers.hostingprovider.tld) where they can access the space in a mod_ruid2 environment and only requires normal DA usage.
 
CustomBuild 2.0 from now supports mod_ruid2 combination with suPHP. For example, in CB 2.0 you can have php1_mode=mod_php, php2_mode=suphp and mod_ruid2=yes set. This way the main version would run as an apache module and the second one as PHP-CGI (suPHP). suPHP also shows a called script in the process list from now.
 
Should i suggest to add mod_geoip (and maybe also geoip itself) in CB 2?

I got steps for compile and installation if you need.

Regards
 
CustomBuild 2.0 from now supports mod_ruid2 combination with suPHP. For example, in CB 2.0 you can have php1_mode=mod_php, php2_mode=suphp and mod_ruid2=yes set. This way the main version would run as an apache module and the second one as PHP-CGI (suPHP). suPHP also shows a called script in the process list from now.

I am only running one version of php (php 5.4) and I am running it as cgi with suphp. I am running custombuild 1.2. Does this mean that I can upgrade to custombuild 2.0 and continue to use cgi/suphp as before without change? Can I run cgi/suphp on one main php version in custombuild 2.0?
 
I am only running one version of php (php 5.4) and I am running it as cgi with suphp. I am running custombuild 1.2. Does this mean that I can upgrade to custombuild 2.0 and continue to use cgi/suphp as before without change? Can I run cgi/suphp on one main php version in custombuild 2.0?

Yes, you can upgrade to CB 2.0 and use suphp. For that you'd just need "./build apache; ./build suphp; ./build php n" ("./build suphp" is needed because of the patches added to CB 2.0 and you're already running suPHP). And yes, you can run suphp, php-fpm or mod_php as the default version of PHP. Please note that CB 2.0 is not supported by DA 1.41.1 (for that you need 1.42 or current DA pre-release version).
 
@Martynas,

suPHP is back in CB 2.0 (good news for me). But is there any benefits of using suPHP alongside with mod_ruid2?
 
@Martynas,

suPHP is back in CB 2.0 (good news for me). But is there any benefits of using suPHP alongside with mod_ruid2?

Now I am getting confused. My understanding has always been that you can't run both suphp and mod_ruid2 on the same php installation. So maybe smtalk was talking about if you run more then one php version at the same time, that you can have suphp on one php version, and mod_ruid2 on another?

If it suddenly is supposed to be possible to run both suphp and mod_ruid2 on the very same php installation, then I am really confused. That should not be possible, I think.
 
@Martynas,

suPHP is back in CB 2.0 (good news for me). But is there any benefits of using suPHP alongside with mod_ruid2?

Yes, there are. You can use 2 different versions of PHP, but one as apache module (e.g. the main one). Without that you could use PHP-FPM or suPHP only, if you'd like to have user processes run under the real username (not apache).
 
So, in case we use suPHP and mod_ruid2, suPHP will use your patch, right? Which would allow to call it from username (not apache)?
 
So, in case we use suPHP and mod_ruid2, suPHP will use your patch, right? Which would allow to call it from username (not apache)?

Yes, you are right. If you have only 1 version of PHP installed as PHP-CGI (suPHP), then mod_ruid2 is not very beneficial to your server :) However, if you have mod_php + php-cgi (suPHP), then you might want to get it installed.
 
Just for clarification: one version only, and only mod_ruid2. What settings do I need?

Thanks.

Jeff
 
So the safest and fastest option for running 2 versions of PHP would be this, correct?
Code:
php1_mode=mod_php
php2_mode=php-fpm
mod_ruid2=yes
 
So the safest and fastest option for running 2 versions of PHP would be this, correct?
Code:
php1_mode=mod_php
php2_mode=php-fpm
mod_ruid2=yes

It would be, but it's not a possible combination. We made suPHP compatible with mod_ruid2, but not PHP-FPM. So, for now you'd need to use PHP-FPM+PHP-FPM (mod_ruid2=no) or mod_php+suPHP (mod_ruid2=yes).
 
It would be, but it's not a possible combination. We made suPHP compatible with mod_ruid2, but not PHP-FPM. So, for now you'd need to use PHP-FPM+PHP-FPM (mod_ruid2=no) or mod_php+suPHP (mod_ruid2=yes).
I see... but I was thinking more of using mod_ruid2 for mod_php since PHP-FPM already loads the processes as the user.
Is mod_ruid2 a global setting, for both PHPs or would something like this work
php1_mode=suphp
php2_mode=php-fpm
mod_ruid2=yes
The first PHP would be mod_php + suphp (seems mandatory to be able use mod_ruid2) + mod_ruid2 for speed
The 2nd one would just be PHP-FPM. The mod_ruid2 switch is ignored.

Basically we've been using mod_php + php-fpm for a while now, but thought it would be interesting to add mod_ruid2 to mod_php now that it's part of DA.
 
I see... but I was thinking more of using mod_ruid2 for mod_php since PHP-FPM already loads the processes as the user.
Is mod_ruid2 a global setting, for both PHPs or would something like this work

The first PHP would be mod_php + suphp (seems mandatory to be able use mod_ruid2) + mod_ruid2 for speed
The 2nd one would just be PHP-FPM. The mod_ruid2 switch is ignored.

Basically we've been using mod_php + php-fpm for a while now, but thought it would be interesting to add mod_ruid2 to mod_php now that it's part of DA.

mod_ruid2 is loaded as an apache module globally (so, it is used for both versons of PHP). That's why you cannot use php-fpm as an option if mod_ruid2=yes is set.
 
Thank you for the clarifications. We'll probably go with PHP-FPM+PHP-FPM via mod_proxy_fcgi since apparently, performance is on par with mod_php.
 
Back
Top