Place all the apache configuration in 0_pagure.conf and drop pagure.conf
This commit is contained in:
parent
78e628ab26
commit
627256cec4
2 changed files with 88 additions and 71 deletions
|
@ -1,3 +1,11 @@
|
|||
WSGISocketPrefix run/wsgi
|
||||
#WSGIRestrictStdout On
|
||||
WSGIRestrictSignal Off
|
||||
WSGIPythonOptimize 1
|
||||
WSGIPassAuthorization On
|
||||
WSGIDaemonProcess pagure user=git group=git maximum-requests=1000
|
||||
display-name=pagure processes=4 threads=4 inactivity-timeout=300
|
||||
|
||||
<VirtualHost *:80>
|
||||
{% if env == 'pagure-staging' %}
|
||||
ServerName stg.pagure.io
|
||||
|
@ -8,24 +16,6 @@
|
|||
{% endif %}
|
||||
</VirtualHost>
|
||||
|
||||
<VirtualHost *:443>
|
||||
ServerName pagure.io:443
|
||||
|
||||
WSGIScriptAlias / /var/www/pagure.wsgi
|
||||
|
||||
SSLEngine on
|
||||
SSLProtocol all -SSLv2 -SSLv3
|
||||
# Use secure TLSv1.1 and TLSv1.2 ciphers
|
||||
Header always add Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"
|
||||
|
||||
SSLCertificateFile /etc/pki/tls/certs/pagure.io.cert
|
||||
SSLCertificateChainFile /etc/pki/tls/certs/pagure.io.intermediate.cert
|
||||
SSLCertificateKeyFile /etc/pki/tls/certs/pagure.io.key
|
||||
</VirtualHost>
|
||||
|
||||
|
||||
#TODO: move this to 443 when we have the ssl certs
|
||||
|
||||
<VirtualHost *:80>
|
||||
{% if env == 'pagure-staging' %}
|
||||
ServerName docs.stg.pagure.org
|
||||
|
@ -35,5 +25,85 @@
|
|||
|
||||
WSGIScriptAlias / /var/www/docs_pagure.wsgi
|
||||
|
||||
WSGIScriptAlias / /var/www/docs_pagure.wsgi
|
||||
|
||||
Alias /static /usr/lib/python2.7/site-packages/pagure/static/
|
||||
|
||||
<Location />
|
||||
WSGIProcessGroup pagure
|
||||
<IfModule mod_authz_core.c>
|
||||
# Apache 2.4
|
||||
Require all granted
|
||||
</IfModule>
|
||||
<IfModule !mod_authz_core.c>
|
||||
# Apache 2.2
|
||||
Order deny,allow
|
||||
Allow from all
|
||||
</IfModule>
|
||||
</Location>
|
||||
</VirtualHost>
|
||||
|
||||
<VirtualHost *:443>
|
||||
{% if env == 'pagure-staging' %}
|
||||
ServerName stg.pagure.io
|
||||
{% else %}
|
||||
ServerName pagure.io
|
||||
{% endif %}
|
||||
|
||||
WSGIScriptAlias / /var/www/pagure.wsgi
|
||||
|
||||
SSLEngine on
|
||||
SSLProtocol all -SSLv2 -SSLv3
|
||||
# Use secure TLSv1.1 and TLSv1.2 ciphers
|
||||
Header always add Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"
|
||||
|
||||
SSLCertificateFile /etc/pki/tls/certs/pagure.io.cert
|
||||
SSLCertificateChainFile /etc/pki/tls/certs/pagure.io.intermediate.cert
|
||||
SSLCertificateKeyFile /etc/pki/tls/certs/pagure.io.key
|
||||
|
||||
Alias /static /usr/lib/python2.7/site-packages/pagure/static/
|
||||
Alias /releases /var/www/releases
|
||||
|
||||
SetEnv GIT_PROJECT_ROOT /srv/git/repositories
|
||||
|
||||
AliasMatch ^/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$ /srv/git/repositories/$1
|
||||
AliasMatch ^/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$ /srv/git/repositories/$1
|
||||
ScriptAliasMatch \
|
||||
"(?x)^/(.*/(HEAD | \
|
||||
info/refs | \
|
||||
objects/info/[^/]+ | \
|
||||
git-(upload|receive)-pack))$" \
|
||||
/usr/libexec/git-core/git-http-backend/$1
|
||||
|
||||
<Location />
|
||||
WSGIProcessGroup pagure
|
||||
<IfModule mod_authz_core.c>
|
||||
# Apache 2.4
|
||||
Require all granted
|
||||
</IfModule>
|
||||
<IfModule !mod_authz_core.c>
|
||||
# Apache 2.2
|
||||
Order deny,allow
|
||||
Allow from all
|
||||
</IfModule>
|
||||
</Location>
|
||||
|
||||
<Location /releases>
|
||||
WSGIProcessGroup pagure
|
||||
<IfModule mod_authz_core.c>
|
||||
# Apache 2.4
|
||||
Require all granted
|
||||
</IfModule>
|
||||
<IfModule !mod_authz_core.c>
|
||||
# Apache 2.2
|
||||
Order deny,allow
|
||||
Allow from all
|
||||
</IfModule>
|
||||
</Location>
|
||||
|
||||
<Directory /var/www/releases>
|
||||
Options +Indexes
|
||||
</Directory>
|
||||
|
||||
</VirtualHost>
|
||||
|
||||
|
|
|
@ -1,53 +0,0 @@
|
|||
Alias /static /usr/lib/python2.7/site-packages/pagure/static/
|
||||
Alias /releases /var/www/releases
|
||||
|
||||
SetEnv GIT_PROJECT_ROOT /srv/git/repositories
|
||||
|
||||
AliasMatch ^/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$ /srv/git/repositories/$1
|
||||
AliasMatch ^/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$ /srv/git/repositories/$1
|
||||
ScriptAliasMatch \
|
||||
"(?x)^/(.*/(HEAD | \
|
||||
info/refs | \
|
||||
objects/info/[^/]+ | \
|
||||
git-(upload|receive)-pack))$" \
|
||||
/usr/libexec/git-core/git-http-backend/$1
|
||||
|
||||
|
||||
|
||||
WSGIDaemonProcess pagure user=git group=git maximum-requests=1000 display-name=pagure processes=4 threads=4 inactivity-timeout=300
|
||||
|
||||
WSGISocketPrefix run/wsgi
|
||||
#WSGIRestrictStdout On
|
||||
WSGIRestrictSignal Off
|
||||
WSGIPythonOptimize 1
|
||||
WSGIPassAuthorization On
|
||||
|
||||
<Location />
|
||||
WSGIProcessGroup pagure
|
||||
<IfModule mod_authz_core.c>
|
||||
# Apache 2.4
|
||||
Require all granted
|
||||
</IfModule>
|
||||
<IfModule !mod_authz_core.c>
|
||||
# Apache 2.2
|
||||
Order deny,allow
|
||||
Allow from all
|
||||
</IfModule>
|
||||
</Location>
|
||||
|
||||
<Location /releases>
|
||||
WSGIProcessGroup pagure
|
||||
<IfModule mod_authz_core.c>
|
||||
# Apache 2.4
|
||||
Require all granted
|
||||
</IfModule>
|
||||
<IfModule !mod_authz_core.c>
|
||||
# Apache 2.2
|
||||
Order deny,allow
|
||||
Allow from all
|
||||
</IfModule>
|
||||
</Location>
|
||||
|
||||
<Directory /var/www/releases>
|
||||
Options +Indexes
|
||||
</Directory>
|
Loading…
Add table
Add a link
Reference in a new issue