mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-04-24 02:20:51 +08:00
add apache config for modernpaste + sn2mp
Signed-off-by: Ricky Elrod <codeblock@fedoraproject.org>
This commit is contained in:
29
roles/modernpaste/files/modern-paste.conf
Normal file
29
roles/modernpaste/files/modern-paste.conf
Normal file
@@ -0,0 +1,29 @@
|
||||
WSGIDaemonProcess stickynotes2modernpaste user=apache group=apache threads=5
|
||||
WSGIScriptAlias /stickynotes2modernpaste /usr/share/stickynotes2modernpaste/stickynotes2modernpaste.wsgi
|
||||
WSGISocketPrefix run/wsgi
|
||||
|
||||
RewriteEngine on
|
||||
RewriteCond %{HTTP_USER_AGENT} ^fpaste\/0\.3.*$ [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^Python\-urllib.*$
|
||||
RewriteCond %{REQUEST_METHOD} POST
|
||||
RewriteRule ^/$ /stickynotes2modernpaste/$1 [L,PT]
|
||||
RewriteRule ^/(.*)=/$ /stickynotes2modernpaste/$1= [L,PT]
|
||||
|
||||
WSGIScriptAlias / /usr/share/modern-paste/modern_paste.wsgi
|
||||
|
||||
<Directory /usr/share/stickynotes2modernpaste>
|
||||
WSGIProcessGroup stickynotes2modernpaste
|
||||
WSGIApplicationGroup %{GLOBAL}
|
||||
WSGIScriptReloading On
|
||||
Order deny,allow
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
<Directory /usr/share/modern-paste>
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
DocumentRoot /usr/share/modern-paste
|
||||
ErrorLog logs/modern-paste-error.log
|
||||
CustomLog logs/modern-paste-access.log combined
|
||||
LogLevel info
|
||||
@@ -7,6 +7,7 @@
|
||||
- mod_wsgi
|
||||
- python2-mock
|
||||
- modern-paste
|
||||
- stickynotes2modernpaste
|
||||
tags:
|
||||
- packages
|
||||
- modernpaste
|
||||
@@ -25,6 +26,13 @@
|
||||
- modernpaste
|
||||
notify: reload httpd
|
||||
|
||||
- name: modernpaste apache config
|
||||
copy: src=modern-paste.conf dest=/etc/httpd/conf.d/modern-paste.conf owner=root group=root mode=644
|
||||
tags:
|
||||
- config
|
||||
- modernpaste
|
||||
notify: reload httpd
|
||||
|
||||
- name: Apply modernpaste hotfixes for forcing 1 week expiry (1)
|
||||
copy: src=post.html dest=/usr/share/modern-paste/app/templates/paste/post.html owner=root group=root mode=644
|
||||
tags:
|
||||
|
||||
Reference in New Issue
Block a user