0

I've installed Koha 3.6 - as provided by Vimal Kumar on Ubuntu 10.04 LTS. This works excellently.

However, I want to access the web Staff/OPAC client via LAN, so that I can open the clients on another computer (Windows 7) in addition to accessing it on the Koha machine.

Vimal directed me to this website: http://kohageek.pbworks.com/w/page/51840331/Network%20Configuration

Here is a break down of the instructions, and what I did. This method failed, and I reverted my files back to their original content, and my Staff/OPAC clients work again now, but are still not accessible on LAN.

I've got a router for this, and I connected each computer to the router - they can see each other on the network.

1) sudo gedit /etc/hosts
Enter the IP Address and Fully Qualified Domain Name

My original file contains the following:

127.0.0.1 localhost
127.0.1.1 ansa-desktop

#The following lines are desirable for IPv6 capable hosts) ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

I replaced the top part with:

127.0.0.1 localhost
192.168.1.10 ansa-desktop

2) sudo gedit /etc/hostname Enter the hostname of your system without domain name

My file contains the following:

ansa-desktop

I didn't make changes in this file - it look right to me.

3) In System --> Preferences -> Network Connections Choose DHCP or Enter Static IP Number, subnet mask and gateway information

I chose the following:

IP: 192.168.1.10
Subnetmask:255.255.255.0
Gateway: 0.0.0.0 (automatically set)

4) sudo gedit /etc/koha/koha-httpd.conf Change the IP number in OPAC and Intranet virtual host.

My original file contained the following and the IPs in bold was subsequently swapped with my selected static IP (192.168.1.10):

# Koha Apache Configuration Directives

#NameVirtualHost *

## OPAC
'<'VirtualHost 127.0.1.1:80>
ServerAdmin webmaster@koha-desktop
DocumentRoot /usr/share/koha/opac/htdocs
ServerName koha-desktop
# 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 "/usr/share/koha/opac/cgi-bin/opac/opac-search.pl"
ScriptAlias /search "/usr/share/koha/opac/cgi-bin/opac/opac-search.pl"
ErrorLog /var/log/koha/koha-opac-error_log
# CustomLog /var/log/koha/koha-opac-access_log combined
# TransferLog /var/log/koha/koha-opac-access_log
SetEnv KOHA_CONF "/etc/koha/koha-conf.xml"
SetEnv PERL5LIB "/usr/share/koha/lib"
SetEnv MEMCACHED_SERVERS ""
SetEnv MEMCACHED_NAMESPACE ""

  <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/javascript$  
    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>  

 <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  
   </IfModule>  
 </IfModule>  

# 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
# SetEnv OPAC_SEARCH_LIMIT branch:CODE
# SetEnv OPAC_LIMIT_OVERRIDE 1

  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]  

## Intranet
'<'VirtualHost 127.0.1.1:8080>
ServerAdmin webmaster@koha-desktop
DocumentRoot /usr/share/koha/intranet/htdocs
ServerName koha-desktop:8080
# ServerAlias intranet.mydomain.com
ScriptAlias /cgi-bin/koha/ "/usr/share/koha/intranet/cgi-bin/"
ScriptAlias /index.html "/usr/share/koha/intranet/cgi-bin/mainpage.pl"
ScriptAlias /search "/usr/share/koha/intranet/cgi-bin/search.pl"
ErrorLog /var/log/koha/koha-error_log
# TransferLog /var/log/koha/koha-access_log
SetEnv KOHA_CONF "/etc/koha/koha-conf.xml"
SetEnv PERL5LIB "/usr/share/koha/lib"
SetEnv MEMCACHED_SERVERS ""
SetEnv MEMCACHED_NAMESPACE ""
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  

  <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/javascript$  
    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>  

  <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  
    </IfModule>  
 </IfModule>  

  RewriteEngine On      

# Uncomment to turn on rewrite logging
# RewriteLog /var/log/koha/koha-intranet-rewrite.log
# RewriteLogLevel 1

  RewriteCond %{QUERY_STRING} (.*?)(?:[A-Za-z0-9_-]+)=&(.*)  
  RewriteRule (.+) $1?%1%2 [N,R,NE]  
  RewriteRule ^/bib/([^\/]*)/?$ /cgi-bin/koha/detail\.pl?bib=$1 [PT]  
  RewriteRule ^/isbn/([^\/]*)/?$ /search?q=isbn:$1 [PT]  
  RewriteRule ^/issn/([^\/]*)/?$ /search?q=issn:$1 [PT]  


servername localhost

5) Restart Apache /etc/init.d/apache2 restart

This failed (I forgot the error message, but can recreate it if required).

I also have Webmin installed and configured, as part of the Koha install - if this should be relevant.

I have also looked at this article, but couldn't gleam from it a resolve for my problem:stackoverflow article

If anyone can tell me why this didn't work and how to make it work, I would really appreciated it.

Thanks Jurgens

4

3 回答 3

0

你真的不需要所有这些配置,如果你使用 live dvd 一切都已经配置好了。

您需要做的就是去您的终端并运行 ifconfig 以查看您机器上的 IP 地址,您将在所有其他系统的地址栏中输入此 IP 地址,他们将看到您的 Koha。

于 2014-03-27T10:16:51.737 回答
0

这根本不是一个特定的问题。这是如何让您的 apache 服务器在您的 LAN 上响应。

首先做一个 sudo ifconfig

找出你的服务器的IP是什么。然后设置 apache 来监听那个地址。

在这方面,Koha 没有什么特别之处,它只是一个网站。所以你只需要 apache2 回答你局域网上的 IP 号码。不是 127.0.0.1

Koha也不需要webmin

于 2012-08-06T02:59:42.620 回答
0

请检查您的 koha 服务器和客户端计算机上是否有相同的网络......在我们的例子中,koha 可以使用其 IP 地址通过 LAN 访问。

您可能还需要检查网络配置本身。例如,如果您的客户端 PC 无法 ping 到 koha 服务器的任何请求,那么您的网络配置可能是问题所在。

我们的 koha 在 LAN 上工作,无需在“koha-httpd.conf”上进行任何配置。

于 2017-03-03T06:24:55.800 回答