[Koha] I can access de staff client but not the OPAC

teleute surferpoint9819 at gmail.com
Thu Jun 23 11:03:48 NZST 2011

At last I could fix it! :)

For future reference, i'll explain what the problem was, maybe it'll help
someone someday

I had two problems:

for some reason, in the file /etc/apache2/sites-enabled/koha the part
referring to the OPAC was completely empty. I was lucky to have another koha
installed in another computer, so I just copied it and adapted it, changing
the ip, serveradmin, documentroot... etc. this is the part I copied:

<VirtualHost *:8081>
   ServerAdmin  webmaster at koha-builder
   DocumentRoot /usr/share/koha/opac/htdocs
   ServerName koha-builder
#  ServerAlias opac.mydomain.com
   ScriptAlias /cgi-bin/koha/ "/usr/share/koha/opac/cgi-bin/opac/"
   ScriptAlias /index.html "/usr/share/koha/opac/cgi-bin/opac/opac-main.pl"
   ScriptAlias /opac-search.pl
   ScriptAlias /search "/usr/share/koha/opac/cgi-bin/opac/opac-search.pl"
   ErrorLog /var/log/koha/koha-opac-error_log
#  TransferLog /var/log/koha/koha-opac-access_log
   SetEnv KOHA_CONF "/etc/koha/koha-conf.xml"
   SetEnv PERL5LIB "/usr/share/koha/lib"

   <IfModule mod_gzip.c>
     mod_gzip_on yes
     mod_gzip_dechunk yes
     mod_gzip_keep_workfiles No
     mod_gzip_can_negotiate yes
     mod_gzip_update_static No
     mod_gzip_temp_dir /tmp
     mod_gzip_minimum_file_size 512
     mod_gzip_maximum_file_size 1000000
     mod_gzip_maximum_inmem_size 1000000
     mod_gzip_handle_methods GET POST
     mod_gzip_item_exclude reqheader "User-Agent: .*Mozilla/4\..*\["
     mod_gzip_item_exclude mime ^image/.*
     mod_gzip_item_exclude rspheader Content-Type:image/*
     mod_gzip_item_include file \.js$
     mod_gzip_item_include mime ^application/x-javascript$
     mod_gzip_item_include file \.php$
     mod_gzip_item_include mime ^text/html$
     mod_gzip_item_include file \.css$
     mod_gzip_item_include mime ^text/css$

  <IfModule mod_deflate.c>

    # Compress content with type html, text, and css, ...
    AddOutputFilterByType DEFLATE text/plain text/html text/xml text/css
    AddOutputFilterByType DEFLATE application/xml application/xhtml+xml
application/rss+xml application/javascript application/x-javascript

    DeflateCompressionLevel 9

    # Properly handle old browsers that do not support compression
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

    DeflateFilterNote Input instream
    DeflateFilterNote Output outstream
    DeflateFilterNote Ratio ratio

    LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
    <IfModule mod_headers.c>
       #properly handle requests coming from behind proxies
       Header append Vary User-Agent

#  Repeat this virtualhost stanza changing the following environment vars to
#  create multiple OPAC interfaces with custom css and/or search limits:
#  SetEnv OPAC_CSS_OVERRIDE mystyle.css

   Options +FollowSymLinks

   ErrorDocument 400 /cgi-bin/koha/errors/400.pl
   ErrorDocument 401 /cgi-bin/koha/errors/401.pl
   ErrorDocument 403 /cgi-bin/koha/errors/403.pl
   ErrorDocument 404 /cgi-bin/koha/errors/404.pl
   ErrorDocument 500 /cgi-bin/koha/errors/500.pl

#  Rewrite Rules
   RewriteEngine On

#  Uncomment to turn on rewrite logging
#  RewriteLog /var/log/koha/koha-opac-rewrite.log
#  RewriteLogLevel 1
   RewriteCond %{QUERY_STRING} (.*?)(?:[A-Za-z0-9_-]+)=&(.*)
   RewriteRule (.+) $1?%1%2 [N,R,NE]

   RewriteRule ^/bib/([^\/]*)/?$ /cgi-bin/koha/opac-detail\.pl?bib=$1 [PT]
   RewriteRule ^/isbn/([^\/]*)/?$ /search?q=isbn:$1 [PT]
   RewriteRule ^/issn/([^\/]*)/?$ /search?q=issn:$1 [PT]

second problem: i had been tinkering with the apache virtual servers in
webadmin and making a mess. Thanks to Olugbenga Adara I learned that the
document root for the OPAC is usually /usr/share/koha/opac/htdocs

after fixing that, I restarted apache with

/etc/init.d/apache2 restart 

and there it was! 

thanks to everybody for your help :)

View this message in context: http://koha.1045719.n5.nabble.com/I-can-access-de-staff-client-but-not-the-OPAC-tp4513503p4515802.html
Sent from the Koha - Discuss mailing list archive at Nabble.com.

More information about the Koha mailing list