1st shot: install memcached, download and extract archive, make and make install
This commit is contained in:
108
templates/apache-intranet.conf
Normal file
108
templates/apache-intranet.conf
Normal file
@@ -0,0 +1,108 @@
|
||||
#intranet
|
||||
|
||||
<VirtualHost *:80>
|
||||
ServerName {{ koha_intranet_hostname }}
|
||||
RedirectMatch permanent / https://{{ koha_intranet_hostname }}
|
||||
</VirtualHost>
|
||||
|
||||
<VirtualHost *:443>
|
||||
ServerAdmin webmaster@sciencespo-lyon.lan
|
||||
DocumentRoot {{ koha_install_dir }}/intranet/htdocs
|
||||
ServerName {{ koha_intranet_hostname }}
|
||||
ScriptAlias /cgi-bin/koha/ "{{ koha_install_dir }}/intranet/cgi-bin/"
|
||||
ScriptAlias /index.html "{{ koha_install_dir }}/intranet/cgi-bin/mainpage.pl"
|
||||
ScriptAlias /search "{{ koha_install_dir }}/intranet/cgi-bin/catalogue/search.pl"
|
||||
Alias /plugin/ "{{ koha_install_dir }}/var/lib/koha/plugins/"
|
||||
ErrorLog {{ koha_install_dir }}/var/log/koha-error_log
|
||||
TransferLog {{ koha_install_dir }}/var/log/koha-access.log
|
||||
SetEnv KOHA_CONF "{{ koha_install_dir }}/etc/koha-conf.xml"
|
||||
SetEnv PERL5LIB "{{ koha_install_dir }}/lib"
|
||||
SetEnv MEMCACHED_SERVERS "127.0.0.1:11211"
|
||||
SetEnv MEMCACHED_NAMESPACE "koha_library"
|
||||
SetEnv DEBUG 1
|
||||
Options +FollowSymLinks
|
||||
|
||||
SSLEngine on
|
||||
SSLProtocol all -SSLv2
|
||||
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
|
||||
SSLCertificateFile /usr/local/share/ca-certificates/sigb_sciencespo-lyon_fr.crt
|
||||
SSLCertificateKeyFile /usr/local/share/ca-certificates/sigb_sciencespo-lyon_fr.key
|
||||
SSLCertificateChainFile /usr/local/share/ca-certificates/sigb_sciencespo-lyon_fr.chain
|
||||
|
||||
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
|
||||
<Location />
|
||||
require all granted
|
||||
</Location>
|
||||
|
||||
Include /etc/koha/apache-shared-api-acl.conf
|
||||
Include /etc/koha/apache-shared-intranet-plack.conf
|
||||
|
||||
<Directory "{{ koha_install_dir }}/intranet/htdocs">
|
||||
Options -Indexes
|
||||
</Directory>
|
||||
|
||||
# Secure internal stuff
|
||||
|
||||
|
||||
<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 {{ koha_install_dir }}/var/log/koha-intranet-rewrite.log
|
||||
#RewriteLogLevel 1
|
||||
|
||||
#The following two directives are unnecessary to proper Koha functioning.
|
||||
#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]
|
||||
RewriteRule ^(.*)_[0-9]{2}\.[0-9]{7}\.(js|css)$ $1.$2 [L]
|
||||
|
||||
|
||||
# REST API configuration
|
||||
Alias "/api" "{{ koha_install_dir }}/api"
|
||||
<Directory {{ koha_install_dir }}/api>
|
||||
Options +ExecCGI +FollowSymlinks
|
||||
AddHandler cgi-script .pl
|
||||
|
||||
SetEnv MOJO_MODE "production"
|
||||
|
||||
RewriteEngine On
|
||||
RewriteBase /api/
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{DOCUMENT_ROOT}/../api/$1/app.pl -f
|
||||
RewriteRule ^(.*?)/.* $1/app.pl/api/$0 [L]
|
||||
</Directory>
|
||||
</IfModule>
|
||||
</VirtualHost>
|
||||
Reference in New Issue
Block a user