[Koha-devel] Koha development server on Debian Wheezy
Holger Meissner
Holger.Meissner at hs-gesundheit.de
Mon Dec 2 12:08:36 CET 2013
Hi Fridolin,
this is the configuration from when I tried to install without packages:
# Koha Apache Configuration Directives
#NameVirtualHost *
## OPAC
<VirtualHost 127.0.1.1:80>
ServerAdmin webmaster at debian
DocumentRoot /root/koha/koha-tmpl
ServerName debianLOL
# ServerAlias opac.mydomain.com
ScriptAlias /cgi-bin/koha/ "/root/koha/opac/"
ScriptAlias /index.html "/root/koha/opac/opac-main.pl"
ScriptAlias /opac-search.pl "/root/koha/opac/opac-search.pl"
ScriptAlias /search "/root/koha/opac/opac-search.pl"
ErrorLog /root/koha-dev/var/log/koha-opac-error_log
# CustomLog /root/koha-dev/var/log/koha-opac-access.log combined
# TransferLog /root/koha-dev/var/log/koha-opac-access.log
SetEnv KOHA_CONF "/root/koha-dev/etc/koha-conf.xml"
SetEnv PERL5LIB "/root/koha"
SetEnv MEMCACHED_SERVERS ""
SetEnv MEMCACHED_NAMESPACE ""
# This syntax allows you to override a system preference
# for a given virtual host. Use with caution!
# You should add all the system preferences you override
# in one or more vhosts to the environment variable
# OVERRIDE_SYSPREF_NAMES for your staff intranet vhost
# SetEnv OVERRIDE_SYSPREF_PrefName Value
<Directory "/root/koha/koha-tmpl">
Options -Indexes
</Directory>
# Secure internal stuff
<DirectoryMatch "/root/koha/koha-tmpl/.*/(modules|xslt|includes)">
Order deny,allow
Deny from all
</DirectoryMatch>
<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
<IfModule mod_rewrite.c>
# Rewrite Rules
RewriteEngine On
# Uncomment to turn on rewrite logging
#RewriteLog /root/koha-dev/var/log/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]
</IfModule>
</VirtualHost>
## Intranet
<VirtualHost 127.0.1.1:8080>
ServerAdmin webmaster at debian
DocumentRoot /root/koha/koha-tmpl
ServerName debian:8080
# ServerAlias intranet.mydomain.com
ScriptAlias /cgi-bin/koha/ "/root/koha/"
ScriptAlias /index.html "/root/koha/mainpage.pl"
ScriptAlias /search "/root/koha/search.pl"
Alias /plugin/ "/root/koha-dev/var/lib/plugins/"
ErrorLog /root/koha-dev/var/log/koha-error_log
# TransferLog /root/koha-dev/var/log/koha-access.log
SetEnv KOHA_CONF "/root/koha-dev/etc/koha-conf.xml"
SetEnv PERL5LIB "/root/koha"
SetEnv MEMCACHED_SERVERS ""
SetEnv MEMCACHED_NAMESPACE ""
Options +FollowSymLinks
# If you are overriding any system preferences,
# list them in this variable so the preference editor
# knows that they have been overridden.
# SetEnv OVERRIDE_SYSPREF_NAMES "Pref1,Pref2,Pref3"
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
<Directory "/root/koha/koha-tmpl">
Options -Indexes
</Directory>
# Secure internal stuff
<DirectoryMatch "/root/koha/koha-tmpl/.*/(modules|xslt|includes)">
Order deny,allow
Deny from all
</DirectoryMatch>
<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>
<IfModule mod_rewrite.c>
# Rewrite Rules
RewriteEngine On
# Uncomment to turn on rewrite logging
#RewriteLog /root/koha-dev/var/log/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]
</IfModule>
</VirtualHost>
The other one, from the package install where I get the 403 looks like this:
# 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/opac-search.pl"
ScriptAlias /search "__OPAC_CGI_DIR__/opac/opac-search.pl"
ErrorLog __LOG_DIR__/koha-opac-error_log
# CustomLog __LOG_DIR__/koha-opac-access.log combined
# TransferLog __LOG_DIR__/koha-opac-access.log
SetEnv KOHA_CONF "__KOHA_CONF_DIR__/koha-conf.xml"
SetEnv PERL5LIB "__PERL_MODULE_DIR__"
SetEnv MEMCACHED_SERVERS "__MEMCACHED_SERVERS__"
SetEnv MEMCACHED_NAMESPACE "__MEMCACHED_NAMESPACE__"
# This syntax allows you to override a system preference
# for a given virtual host. Use with caution!
# You should add all the system preferences you override
# in one or more vhosts to the environment variable
# OVERRIDE_SYSPREF_NAMES for your staff intranet vhost
# SetEnv OVERRIDE_SYSPREF_PrefName Value
<Directory "__OPAC_WWW_DIR__">
Options -Indexes
</Directory>
# Secure internal stuff
<DirectoryMatch "__OPAC_WWW_DIR__/.*/(modules|xslt|includes)">
Order deny,allow
Deny from all
</DirectoryMatch>
<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
<IfModule mod_rewrite.c>
# 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]
</IfModule>
</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"
Alias /plugin/ "__PLUGINS_DIR__/"
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__"
SetEnv MEMCACHED_SERVERS "__MEMCACHED_SERVERS__"
SetEnv MEMCACHED_NAMESPACE "__MEMCACHED_NAMESPACE__"
Options +FollowSymLinks
# If you are overriding any system preferences,
# list them in this variable so the preference editor
# knows that they have been overridden.
# SetEnv OVERRIDE_SYSPREF_NAMES "Pref1,Pref2,Pref3"
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
<Directory "__INTRANET_WWW_DIR__">
Options -Indexes
</Directory>
# Secure internal stuff
<DirectoryMatch "__INTRANET_WWW_DIR__/.*/(modules|xslt|includes)">
Order deny,allow
Deny from all
</DirectoryMatch>
<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>
<IfModule mod_rewrite.c>
# Rewrite Rules
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]
</IfModule>
</VirtualHost>
-----Ursprüngliche Nachricht-----
Von: koha-devel-bounces at lists.koha-community.org [mailto:koha-devel-bounces at lists.koha-community.org] Im Auftrag von Fridolin SOMERS
Gesendet: Freitag, 29. November 2013 17:20
An: koha-devel at lists.koha-community.org
Betreff: Re: [Koha-devel] Koha development server on Debian Wheezy
Hie,
Give your Apache configuration : etc/koha-httpd.conf
Regards,
Le 29/11/2013 17:13, Holger Meissner a écrit :
> Dear community,
>
> I'd like to set up Koha and Git for development. I use Oracle VM Virtual Box and Debian 7.2 Wheezy. First thing I tried, was to follow those instructions:
> http://wiki.koha-community.org/wiki/Install_and_Setup_Koha_to_use_Git_
> on_a_Development_Server
>
> After pointing the files to the kohaclone I get a 403 Forbidden, when trying to navigate localhost:8080.
> How do I upgrade the database?
>
> I also tried to use Koha-gitify, but there was the same problem.
> https://github.com/mkfifo/koha-gitify
>
> Then I tried to install without packages:
> http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=INSTALL.debi
> an Yet the VirtualHost configuration seems to be incorrect and I'm
> unable to figure out why.
> [warn] NameVirtualHost *:80 has no VirtualHosts [warn] NameVirtualHost
> *:8080 has no VirtualHosts
>
> Any suggestions how to fix these errors?
> Thanks!
>
> Holger
>
>
>
> _______________________________________________
> Koha-devel mailing list
> Koha-devel at lists.koha-community.org
> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
> website : http://www.koha-community.org/ git :
> http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
>
--
Fridolin SOMERS
Biblibre - Pôle support
fridolin.somers at biblibre.com
_______________________________________________
Koha-devel mailing list
Koha-devel at lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
More information about the Koha-devel
mailing list