Koha/etc/koha-httpd.conf
2007-12-17 09:13:52 -06:00

59 lines
2.2 KiB
Text

# Koha Apache Configuration Directives
#NameVirtualHost *
## OPAC
<VirtualHost __WEBSERVER_IP__:__WEBSERVER_PORT__>
ServerAdmin __WEBMASTER_EMAIL__
DocumentRoot __OPAC_WWW_DIR__
ServerName __WEBSERVER_HOST__
# ServerAlias opac.mydomain.com
ScriptAlias /cgi-bin/koha/ "__OPAC_CGI_DIR__/opac/"
ScriptAlias /index.html "__OPAC_CGI_DIR__/opac/opac-main.pl"
ScriptAlias /opac-search.pl "__OPAC_CGI_DIR__/opac/search"
ScriptAlias /search "__OPAC_CGI_DIR__/opac/search"
ErrorLog __LOG_DIR__/koha-opac-error_log
# TransferLog __LOG_DIR__/koha-opac-access_log
SetEnv KOHA_CONF "__KOHA_CONF_DIR__/koha-conf.xml"
SetEnv PERL5LIB "__PERL_MODULE_DIR__"
Options +FollowSymLinks
# Rewrite Rules
RewriteEngine On
# Uncomment to turn on rewrite logging
# RewriteLog __LOG_DIR__/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]
</VirtualHost>
## Intranet
<VirtualHost __WEBSERVER_IP__:__WEBSERVER_PORT_LIBRARIAN__>
ServerAdmin __WEBMASTER_EMAIL__
DocumentRoot __INTRANET_WWW_DIR__
ServerName __WEBSERVER_HOST__:__WEBSERVER_PORT_LIBRARIAN__
# ServerAlias intranet.mydomain.com
ScriptAlias /cgi-bin/koha/ "__INTRANET_CGI_DIR__/"
ScriptAlias /index.html "__INTRANET_CGI_DIR__/mainpage.pl"
ScriptAlias /search "__INTRANET_CGI_DIR__/search.pl"
ErrorLog __LOG_DIR__/koha-error_log
# TransferLog __LOG_DIR__/koha-access_log
SetEnv KOHA_CONF "__KOHA_CONF_DIR__/koha-conf.xml"
SetEnv PERL5LIB "__PERL_MODULE_DIR__"
Options +FollowSymLinks
RewriteEngine On
# Uncomment to turn on rewrite logging
# RewriteLog __LOG_DIR__/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]
</VirtualHost>