Author: jfs Date: Sun Apr 17 15:49:05 2016 New Revision: 11111 URL: http://svn.debian.org/wsvn/?sc=1&rev=11111 Log:
- Add HTTP virtual host - Add mod_cache to cache contents returned by the script - Adjust permissions for the static manpages (require includes and other fancy options) Modified: man-cgi/conf/apache.conf Modified: man-cgi/conf/apache.conf URL: http://svn.debian.org/wsvn/man-cgi/conf/apache.conf?rev=11111&op=diff ============================================================================== --- man-cgi/conf/apache.conf (original) +++ man-cgi/conf/apache.conf Sun Apr 17 15:49:05 2016 @@ -1,39 +1,67 @@ -<Macro CommonVirtualHostConfiguration> - ServerAdmin j...@debian.org +<VirtualHost *:80> + ServerName manpages.debian.net - ErrorLog /srv/manpages.debian.org/manpages.debian.org-error.log - CustomLog /srv/manpages.debian.org/manpages.debian.org-access.log combined -# For debugging: -# ErrorLog /srv/manpages.debian.org/logs/error.log -# CustomLog /srv/manpages.debian.org/logs/access.log combined -</Macro> + ServerAdmin j...@debian.org + ErrorLog /var/log/apache2/manpages.debian.org-error.log + # Enable to anonymse IP addresses + #CustomLog /var/log/apache2/manpages.debian.org-access.log privacy + CustomLog /var/log/apache2/manpages.debian.org-access.log combined -<VirtualHost *:80> - Use CommonVirtualHostConfiguration - ServerName manpages.debian.net - RedirectPermanent / http://manpages.debian.org/ + RedirectPermanent / https://manpages.debian.org/ </VirtualHost> -<VirtualHost *:80> - Use CommonVirtualHostConfiguration - ServerName manpages.debian.org +Use common-debian-service-https-redirect * manpages.debian.org +<VirtualHost *:443> + ServerName manpages.debian.org - <IfModule mod_userdir.c> - UserDir disabled - </IfModule> + Use common-debian-service-ssl manpages.debian.org + Use common-ssl-HSTS + + ServerAdmin j...@debian.org + ErrorLog /var/log/apache2/manpages.debian.org-error.log + # Enable to anonymse IP addresses + #CustomLog /var/log/apache2/manpages.debian.org-access.log privacy + CustomLog /var/log/apache2/manpages.debian.org-access.log combined + + <IfModule mod_userdir.c> + UserDir disabled + </IfModule> + <IfModule mod_cache.c> + CacheEnable disk / + </IfModule> # Alternative mechanism using mod_rewrite (this is currently implemented # with .htaccess and using mod_redirect -# <IfModule mod_rewrite.c> -# RewriteEngine on -# RewriteRule ^man/([^/]+)/(.*)$ cgi-bin/man.cgi?query=$2&sektion=$1 [L] -# RewriteRule ^man/([^/]+)$ cgi-bin/man.cgi?query=$1 [L] -# </Location> +# <IfModule mod_rewrite.c> +# RewriteEngine on +# RewriteRule ^man/([^/]+)/(.*)$ cgi-bin/man.cgi?query=$2&sektion=$1 [L] +# RewriteRule ^man/([^/]+)$ cgi-bin/man.cgi?query=$1 [L] +# </Location> - DocumentRoot /srv/manpages.debian.org/www + DocumentRoot /srv/manpages.debian.org/www ScriptAlias /cgi-bin/ /srv/manpages.debian.org/cgi-bin/ - AddDefaultCharset utf-8 + AddDefaultCharset utf-8 + + <Directory /srv/manpages.debian.org/www> + Require all granted + AllowOverride FileInfo + </Directory> + <Directory /srv/manpages.debian.org/cgi-bin> + Require all granted + AllowOverride Limit + Options +ExecCGI + </Directory> + + <Directory /srv/manpages.debian.org/www/static> + Require all granted + # The static content requires the option to nclude files but it is not allowed in Debian vhosts + AllowOverride FileInfo Indexes Limit Options=All,Multiviews + </Directory> + <Directory /srv/manpages.debian.org/www/manpages> + Require all granted + # The static content requires the option to nclude files but it is not allowed in Debian vhosts + AllowOverride FileInfo Indexes Limit Options=All,Multiviews + </Directory> </VirtualHost> # vim:set syn=apache: -