[Koha] How to setup httpd.conf to use domain/opac instead of opac.domain or domain:port

Chris Cormack chris at katipo.co.nz
Fri Jun 16 19:51:52 NZST 2006


On Fri, Jun 16, 2006 at 03:51:32PM +1000, Michael Lake said:
> Hi all
> 
> I would like to have the opac served from the URL 
> http://nsw.royalsoc.org.au/opac
> instead of from a port say http://nsw.royalsoc.org.au:8000

Hi Michael 
 
The trick here is that all the scripts, and html templates, point to  
/cgi-bin/koha/. So if you set it up under /opac/ all the links will break.  
So unfortunately there is no easy way to do it.  
  
There are ways to do it though, the way id do it is with mod_proxy
http://httpd.apache.org/docs/1.3/mod/mod_proxy.html or
http://httpd.apache.org/docs/2.0/mod/mod_proxy.html
> 
> # Ports to listen to for Koha
> Listen 80
> Listen 8080
> Listen 8000 <--- this is blocked so can't really use it
> 
> NameVirtualHost 300.200.100.111
> 
> ##############################
> # nsw.royalsoc.org.au
> ##############################
> 
> <VirtualHost 300.200.100.111>    <-- my real IP addr is here.
>    ServerName nsw.royalsoc.org.au
>    ServerAlias nsw.royalsoc.org.au
>    DocumentRoot /home/rsnsw/web/nsw
>    ErrorLog  /var/log/apache/nsw-error.log
>    CustomLog /var/log/apache/nsw-access.log combined
     
     # for apache 1.3
     ProxyRequests Off
     ProxyPass /opac http://nsw.royalsoc.org.au:8000/cgi-bin/koha/
     ProxyPassReverse /opac  http://nsw.royalsoc.org.au:8000/cgi-bin/koha/
     
     # for apache 2.0 the same as above plus
     <Proxy *>     
        Order deny,allow      
        Allow from all       
     </Proxy>     
     
> </VirtualHost>
> 
> # Koha OPAC settings
> # I want to move this to be available from:
> # http://nsw.royalsoc.org.au/opac
> <VirtualHost nsw.royalsoc.org.au:8000>
>    ServerName nsw.royalsoc.org.au
>    ServerAlias nsw.royalsoc.org.au
>    DocumentRoot /home/koha/koha/opac/htdocs
>    ScriptAlias /cgi-bin/koha/ /home/koha/koha/opac/cgi-bin/
>    Redirect permanent index.html 
> http://nsw.royalsoc.org.au:8000/cgi-bin/koha/opac-main.pl
>    ErrorLog  /var/log/apache/nsw-error.log
>    CustomLog /var/log/apache/nsw-access.log combined
>    SetEnv PERL5LIB "/home/koha/koha/intranet/modules"
>    SetEnv KOHA_CONF "/home/koha/koha/etc/koha.conf"
> </VirtualHost>
> 
> # Koha Intranet settings
> # This is sworking fine.
> <VirtualHost nsw.royalsoc.org.au:8080>
>    ServerName nsw.royalsoc.org.au
>    ServerAlias nsw.royalsoc.org.au
>    DocumentRoot /home/koha/koha/intranet/htdocs
>    ScriptAlias /cgi-bin/koha/ "/home/koha/koha/intranet/cgi-bin/"
>    Redirect permanent index.html
>         http://nsw.royalsoc.org.au:8080/cgi-bin/koha/mainpage.pl
>    ErrorLog  /var/log/apache/koha-error.log
>    TransferLog /var/log/apache/koha-access.log
>    SetEnv PERL5LIB "/home/koha/koha/intranet/modules"
>    SetEnv KOHA_CONF "/home/koha/koha/etc/koha.conf"
> </VirtualHost>
> 

And leave the rest

That will mean a person can go to http://nsw.royalsoc.org.au/opac/opac-main.pl
And it will be fetching it from nsw.royalsoc.org.au:8000 and sending it to
the user over port 80. 

Hope this helps

Chris

-- 
Chris Cormack                                                     Programmer
027 4500 789                                       Katipo Communications Ltd
chris at katipo.co.nz                                          www.katipo.co.nz


More information about the Koha mailing list