[ome-users] Fwd: Forward: Centos/RHEL6 with mod_fastcgi?

Josh Moore josh at glencoesoftware.com
Tue Nov 19 09:38:30 GMT 2013


Forwarding Raj's response to the list.
~J.

Begin forwarded message:

> From: "Adhikari, Rajendra" <RajendraAdhikari at creighton.edu>
> Date: November 18, 2013 11:48:24 PM GMT+01:00
> To: "Wood, Christopher" <CJW at stowers.org>, Josh Moore <josh at glencoesoftware.com>
> Cc: OME Users <ome-users at lists.openmicroscopy.org.uk>
> Subject: RE: [ome-users] Forward: Centos/RHEL6 with mod_fastcgi?
> 
> Thanks Chris. You pointed me to right direction and it is now resolved.
> I have the fastcgi installed from the RPMForge as an RPM. I did not try compiling from source because I was getting dependency error when installting httpd-devel from rhn repo.
> 
> Error: Package: apr-util-devel-1.3.9-3.el6_0.1.x86_64 (rhel-x86_64-server-6)
>           Requires: db4-devel
> 
> And when I try to install db4-devel, this is what I got:
> Setting up Install Process
> Package db4-devel-4.7.25-18.el6_4.x86_64 is obsoleted by db53-devel-5.3.21-1ice.el6.x86_64 which is already installed
> Nothing to do
> 
> This was because the db53-devel installed from Zeroc-ice repo already has later version of db4-level and so conflicting with RHN repository. So, I did not even try to compile the fastcgi as I could not install the httpd-devel. Instead I downloaded and installed binary from RPMForge. And the default fastcgi.conf file it put is below:
> -----
> # WARNING: this is a kludge:
> ## The User/Group for httpd need to be set before we can load mod_fastcgi,
> ## but /etc/httpd/conf.d/fastcgi.conf on RHEL gets loaded before
> ## /etc/httpd/conf/httpd.conf, so we need to set them here :(
> ## mod_fcgid does not have this bug,
> ## but it does not handle child PHP processes appropriately per
> ## http://serverfault.com/questions/303535/a-single-php-fastcgi-process-blocks-all-other-php-requests/305093#305093
> 
> User apache
> Group apache
> 
> LoadModule fastcgi_module modules/mod_fastcgi.so
> 
> # dir for IPC socket files
> FastCgiIpcDir /var/run/mod_fastcgi
> 
> # wrap all fastcgi script calls in suexec
> FastCgiWrapper On
> 
> # global FastCgiConfig can be overridden by FastCgiServer options in vhost config
> FastCgiConfig -idle-timeout 20 -maxClassProcesses 1
> 
> # sample PHP config
> # see /usr/share/doc/mod_fastcgi-2.4.6 for php-wrapper script
> # don't forget to disable mod_php in /etc/httpd/conf.d/php.conf!
> #
> # to enable privilege separation, add a "SuexecUserGroup" directive
> # and chown the php-wrapper script and parent directory accordingly
> # see also http://www.brandonturner.net/blog/2009/07/fastcgi_with_php_opcode_cache/
> #
> #FastCgiServer /var/www/cgi-bin/php-wrapper
> #AddHandler php-fastcgi .php
> #Action php-fastcgi /cgi-bin/php-wrapper
> #AddType application/x-httpd-php .php
> #DirectoryIndex index.php
> #
> #<Location /cgi-bin/php-wrapper>
> #    Order Deny,Allow
> #    Deny from All
> #    Allow from env=REDIRECT_STATUS
> #    Options ExecCGI
> #    SetHandler fastcgi-script
> #</Location>
> ----
> 
> The issue was with FastCGIWrapper set to On. When I comment that line, then I was able to browse the login page. I am not actually sure what and why the FastCGIWrapper mean and did not work when set to on. Anyway, thanks a bunch as atleast I could now advance to the point where I could browse the login page.
> I will put this info in the forum so it might help others.
> 
> 
> Thanks.
> Raj
> 
> 
> -----Original Message-----
> From: Wood, Christopher [mailto:CJW at stowers.org] 
> Sent: Monday, November 18, 2013 3:35 PM
> To: Adhikari, Rajendra; Josh Moore
> Cc: OME Users
> Subject: Re: [ome-users] Forward: Centos/RHEL6 with mod_fastcgi?
> 
> I attached the files. The httpd.conf is just standard except for the line
> to load mod_fastcgi.
> omero.conf is just what is generated by the omero configuration tools.
> 
> I went back and looked at my installation notes and found that I
> downloaded the source for fastcgi and built it using make:
> installed httpd-devel with yum
> Downloaded mod_fastcgi, the top_dir for apache is /usr/lib64/httpd
> cp Makefile.AP2 Makefile
> make top_dir=/usr/lib64/httpd
> make install top_dir=/usr/lib64/httpd
> (not in notes, but probably had to manually add the mod_fastcgi line to
> httpd.conf)
> 
> 
> Here is a ls -l of /etc/httpd that shows where the different directories
> are linked:
> -bash-4.1$ ls -l /etc/httpd/
> total 8
> drwxr-xr-x. 2 root root 4096 Dec  5  2012 conf
> drwxr-xr-x. 2 root root 4096 Dec  4  2012 conf.d
> lrwxrwxrwx. 1 root root   19 Oct  1  2012 logs -> ../../var/log/httpd
> lrwxrwxrwx. 1 root root   29 Oct  1  2012 modules ->
> ../../usr/lib64/httpd/modules
> lrwxrwxrwx. 1 root root   19 Oct  1  2012 run -> ../../var/run/httpd
> 
> ../.. is /
> 
> 
> Here are the omero config web lines:
> 
> omero.web.application_host=http://****.***.***:80
> omero.web.application_server=fastcgi-tcp
> omero.web.debug=True
> omero.web.webgateway_cache=/home/omerouser/OMERO.server/var/weblitz_cache
> 
> 
> Chris
> 
> 
> On 11/18/13 3:07 PM, "Adhikari, Rajendra" <RajendraAdhikari at creighton.edu>
> wrote:
> 
>> Thanks Chris for the response. Omero.web is running as user omero, and
>> apache is running as user apache. Fastcgi.conf is part of apache
>> configuration and that configuration does not say that omero.web is
>> running as apache user, but apache (httpd) running as apache user. It is
>> same as the one that is already there in httpd.conf, but the fastcgi rpm
>> I installed has this in their configuration which states following reason
>> to repeat that here again in fastcgi.conf file:
>> 
>> @omero ~]$ cat /etc/httpd/conf.d/fastcgi.conf
>> # WARNING: this is a kludge:
>> ## The User/Group for httpd need to be set before we can load mod_fastcgi,
>> ## but /etc/httpd/conf.d/fastcgi.conf on RHEL gets loaded before
>> ## /etc/httpd/conf/httpd.conf, so we need to set them here :(
>> ## mod_fcgid does not have this bug,
>> ## but it does not handle child PHP processes appropriately per
>> ## 
>> http://serverfault.com/questions/303535/a-single-php-fastcgi-process-block
>> s-all-other-php-requests/305093#305093
>> 
>> User apache
>> Group apache
>> 
>> LoadModule fastcgi_module modules/mod_fastcgi.so
>> 
>> ..... (more)...
>> 
>> It is good thing that is working for you on same setup. I do not have
>> issues running omero.web or omero server. It is just apache is unable to
>> link to omero.web. So may be something on apache configuration and
>> fastcgi is worng.
>> Can you tell me what is your SetHandler or AddHandler configuration in
>> your apache configuration if you had to do anythig for fastcgi_module?
>> What are your configurations for fastcgi module in httpd.conf besides
>> LoadModule? Can you post your omero apache conf here?  Also, did you
>> already have omero_home/var/omero.fcgi file or you had to manually create
>> that.
>> Also, I am running omero 4.4.9.
>> 
>> Thanks.
>> Raj
>> 
>> 
>> -----Original Message-----
>> From: Wood, Christopher [mailto:CJW at stowers.org]
>> Sent: Monday, November 18, 2013 2:46 PM
>> To: Josh Moore; Adhikari, Rajendra
>> Cc: OME Users
>> Subject: Re: [ome-users] Forward: Centos/RHEL6 with mod_fastcgi?
>> 
>> Hi,
>> 
>> We use the same setup. After reading through the topic on the forum, I
>> can remember issues like that always had to do with the permissions of
>> who owns the files and who is running omero.
>> 
>> I don't have a fastcgi.conf file, fastcgi is just loaded in httpd.conf.
>> 
>> Does the below mean that omeroweb is run as user apache rather than user
>> omero? If so, that might be the problem since apache doesn't own the
>> files that can't be found.
>> 
>> [root at omero conf.d]# cat fastcgi.conf | grep -v "^#" | grep -v "^$"
>> User apache
>> Group apache
>> LoadModule fastcgi_module modules/mod_fastcgi.so FastCgiIpcDir
>> /var/run/mod_fastcgi FastCgiWrapper On FastCgiConfig -idle-timeout 20
>> -maxClassProcesses 1
>> 
>> 
>> 
>> Hope that helps,
>> Chris
>> 
>> On 11/18/13 2:18 PM, "Josh Moore" <josh at glencoesoftware.com> wrote:
>> 
>>>> From Raj:
>>> 
>>> Hello,
>>> Just wondering if anyone is running omero.server and omero.web in
>>> Centos6 or RHEL6 over Apache 2.2 using mod_fastcgi.
>>> I was able to start admin and web, but not able to pass it through
>>> fastcgiexternalserver in apache. I am simply getting URL was not found.
>>> Details of my issue has been discussed here in this link:
>>> 
>>> http://www.openmicroscopy.org/community/viewtopic.php?f=5&t=7355
>>> 
>>> Wondering now, if anyone is running this stuffs in the platform I am
>>> running? (Rhel6/apache2.2 and mod_fastcgi RPM from RPMForge). I would
>>> appreciate someone's help on this.
>>> 
>>> Thanks.
>>> Raj



More information about the ome-users mailing list