add apache config for modernpaste + sn2mp

Signed-off-by: Ricky Elrod <codeblock@fedoraproject.org>
This commit is contained in:
Rick Elrod 2017-01-05 20:18:05 +00:00
parent 51b1f2f0e8
commit ef8b9b7791
2 changed files with 37 additions and 0 deletions

View 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

View file

@ -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: