[ome-users] OME installation, Apache configuration problem

Graham Klyne Graham.Klyne at zoo.ox.ac.uk
Fri Jul 8 10:48:01 BST 2005


Ilya,

Thanks for coming back so promptly.  I'm still stuck, but more details are 
below.

At 13:11 07/07/05 -0400, Ilya Goldberg wrote:
>On Jul 7, 2005, at 12:45 PM, Graham Klyne wrote:
>
>>As far as I can tell, I have Apache running quite happily with
>>Mod_perl, and the test results themselves seem to indicate as much.  I
>>cannot find any indication of what the problem is here, or what I doi
>>to fix it.
>
>What tests did you run to determine that Apache/mod_perl is running
>happily?

None specifically.  Apache has mod_perl configured and there are no errors 
logged.  The OME perl test script is evidently running OK (since it returns 
a sensible, if incorrect, value for the GATEWAY_INTERFACE value.  I am 
assuming that if the Perl script is being run and returning a value then 
the gateway is working OK, and that there is only one CGI gateway interface 
for Perl.

>If it was serving the test script through a mod_perl interface, the
>GATEWAY_INTERFACE environment variable should have indicated CGI-Perl.
>That's what it says in all the Apache/mod_perl combos we know of.
>It could well be that Apache is installed correctly with mod_perl, but
>various ScriptAlias directives are conflicting or preventing things in
>/OME/perl2 from executing via the mod_perl gateway.  There's apparently
>a conflicting ScriptAlias directive for omeis in your installation.
>OMEIS doesn't need mod_perl, but this is a strange error nonetheless.

I tried removing the conflicting ScriptAlias from conf/httpd.conf, and the 
script didn't run at all.  So I put it back again.  This is a virgin system 
installation, so there's no unusual software to interfere with OME.

While doing this, I did wonder that the OME ScriptAlias directive was a 
sub-path of the standard ScriptAlias, which I took to be the cause of the 
conflict:

 From /et/httpd/conf/httpd.conf:
   ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

 From /OME/conf/httpd2.omeis.conf:
   ScriptAlias /cgi-bin/omeis /OME/bin/omeis

(I include the full OME apache conf files below)


>Copy the test script out of the log file and save it as a file wherever
>your ScriptAlias is configured to go through mod_perl.  Then do a GET
>for this script from your browser.  You should see all the environment
>variables available to the script.  There has to be some indication
>there that its running via mod_perl.  If so, please let us know what
>those are.  If not, there's a problem with your ScriptAlias directives
>and/or the mod_perl installation.

Good idea!  Here's the output:

[[
Content-Type: text/plain

SCRIPT_NAME = /perl2/mod_perl_test.pl
SERVER_NAME = localhost
SERVER_ADMIN = root at localhost
HTTP_ACCEPT_ENCODING = gzip,deflate
HTTP_CONNECTION = keep-alive
REQUEST_METHOD = GET
HTTP_ACCEPT = 
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
SCRIPT_FILENAME = /OME/perl2/mod_perl_test.pl
SERVER_SOFTWARE = Apache/2.0.52 (Red Hat)
HTTP_ACCEPT_CHARSET = ISO-8859-1,utf-8;q=0.7,*;q=0.7
QUERY_STRING =
REMOTE_PORT = 32777
HTTP_USER_AGENT = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) 
Gecko/20050523 Red Hat/1.0.4-1.4.1 Firefox/1.0.4
SERVER_PORT = 80
SERVER_SIGNATURE = <address>Apache/2.0.52 (Red Hat) Server at localhost 
Port 80</address>

HTTP_ACCEPT_LANGUAGE = en-us,en;q=0.5
REMOTE_ADDR = 127.0.0.1
HTTP_KEEP_ALIVE = 300
SERVER_PROTOCOL = HTTP/1.1
PATH = /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
REQUEST_URI = /perl2/mod_perl_test.pl
GATEWAY_INTERFACE = CGI/1.1
SERVER_ADDR = 127.0.0.1
DOCUMENT_ROOT = /var/www/html
HTTP_HOST = localhost
MOD_PERL = mod_perl/1.99_16
]]

(I think the last line is a good indication that MOD_PERL is being used.)


>... The actual OME web server (serve.pl)
>should be in the same directory as your working test-script.

I have:
[[
[root at delos ~]# ls /OME/perl2/
mod_perl_test.pl  mod_perl_test.pl~  serve.pl
]]

#g
--

Here are the httpd configuration files generated by the OME installation:

[root at delos ~]# less /OME/conf/httpd.ome.conf
# This is just a skeleton to include the other OME components
# depending on which components were installed with the OME installer
# The following include lines will be added by the installer
# Include $OME_CONF_DIR/httpd.omeis.conf
# Include $OME_CONF_DIR/httpd.omeds.conf
# Include $OME_CONF_DIR/httpd.web.conf
Include /OME/conf/httpd2.web.conf
Include /OME/conf/httpd2.omeis.conf
Include /OME/conf/httpd2.omeds.conf


[root at delos ~]# less /OME/conf/httpd2.web.conf
<IfModule mod_perl.c>
         Alias /JavaScript/ /OME/JavaScript/
         Alias /images/ /OME/images/
         Alias /html/ /OME/html/

         PerlSetEnv PATH /usr/bin/:/usr/local/bin/:/sw/bin/
         Alias /perl2/ /OME/perl2/
         <Directory /OME>
                 Order deny,allow
                 Allow from all
         </Directory>
         <Location /perl2>
                 PerlInitHandler Apache::Reload
                 SetHandler perl-script
                 PerlResponseHandler ModPerl::Registry
                 Options +ExecCGI
         </Location>
</IfModule>


[root at delos ~]# less /OME/conf/httpd2.omeis.conf
<IfModule mod_perl.c>
         ScriptAlias /cgi-bin/omeis /OME/bin/omeis
</IfModule>


[root at delos ~]# less /OME/conf/httpd2.omeds.conf
<IfModule mod_perl.c>
         PerlSetEnv PATH /usr/bin/:/usr/local/bin/:/sw/bin/
         <Location /shoola>
                 PerlInitHandler Apache::Reload
                 SetHandler perl-script
                 PerlHandler OME::Remote::Apache2
                 PerlSetVar dispatch_to "OME::Remote::Facade"
                 PerlSetVar dispatch_with "=> OME::Remote::Facade"
         </Location>
</IfModule>



---
Graham Klyne
Image Bioinformatics Research Group (http://www.bioimage.org/)
Department of Zoology, University of Oxford
South Parks Road, Oxford OX1 3PS, UK
E-mail: <Graham.Klyne at zoo.ox.ac.uk>
Direct phone: +44-(0)1865-281991
Departmental fax: +44-(0)1865-310447




More information about the ome-users mailing list