Main Koha release repository https://koha-community.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

59 lines
2.2 KiB

# Koha Apache Configuration Directives
#NameVirtualHost *
## OPAC
<VirtualHost __WEBSERVER_IP__:80>
ServerAdmin webmaster@__WEBSERVER_DOMAIN__
DocumentRoot __BASE_DIR__/opac/htdocs
ServerName __WEBSERVER_HOST__
# ServerAlias opac.mydomain.com
ScriptAlias /cgi-bin/koha/ "__BASE_DIR__/opac/cgi-bin/"
ScriptAlias /index.html "__BASE_DIR__/opac/cgi-bin/opac-main.pl"
ScriptAlias /opac-search.pl "__BASE_DIR__/opac/cgi-bin/search"
ScriptAlias /search "__BASE_DIR__/opac/cgi-bin/search"
ErrorLog __BASE_DIR__/log/opac-error_log
# TransferLog __BASE_DIR__/log/opac-access_log
SetEnv PERL5LIB "__BASE_DIR__/intranet/modules"
SetEnv KOHA_CONF "__BASE_DIR__/etc/koha-conf.xml"
Options +FollowSymLinks
# Rewrite Rules
RewriteEngine On
# Uncomment to turn on rewrite logging
# RewriteLog __BASE_DIR__/log/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]
</VirtualHost>
## Intranet
<VirtualHost __WEBSERVER_IP__:8080>
ServerAdmin webmaster@__WEBSERVER_DOMAIN__
DocumentRoot __BASE_DIR__/intranet/htdocs
ServerName __WEBSERVER_HOST__:8080
# ServerAlias intranet.mydomain.com
ScriptAlias /cgi-bin/koha/ "__BASE_DIR__/intranet/cgi-bin/"
ScriptAlias /index.html "__BASE_DIR__/intranet/cgi-bin/mainpage.pl"
ScriptAlias /search "__BASE_DIR__/intranet/cgi-bin/search.pl"
ErrorLog __BASE_DIR__/log/error_log
# TransferLog __BASE_DIR__/log/access_log
SetEnv PERL5LIB "__BASE_DIR__/intranet/modules"
SetEnv KOHA_CONF "__BASE_DIR__/etc/koha-conf.xml"
Options +FollowSymLinks
RewriteEngine On
# Uncomment to turn on rewrite logging
# RewriteLog __BASE_DIR__/log/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]
</VirtualHost>