Jgreen has uploaded a new change for review.
https://gerrit.wikimedia.org/r/77912
Change subject: new apache settings for otrs
......................................................................
new apache settings for otrs
Change-Id: I598b8505728ad770e29079ebe708a716b6ee4484
---
M files/apache/sites/ticket.wikimedia.org
1 file changed, 51 insertions(+), 19 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/12/77912/1
diff --git a/files/apache/sites/ticket.wikimedia.org
b/files/apache/sites/ticket.wikimedia.org
index dd08e2f..f765084 100644
--- a/files/apache/sites/ticket.wikimedia.org
+++ b/files/apache/sites/ticket.wikimedia.org
@@ -28,31 +28,19 @@
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\"
\"%{User-agent}i\"" combined
CustomLog /var/log/apache2/otrs-access.log combined
- # This is mostly standard boilerplate from otrs/README.webserver [TS]
- # agent, admin and customer frontend
ScriptAlias /otrs/ "/opt/otrs/bin/cgi-bin/"
Alias /otrs-web/ "/opt/otrs/var/httpd/htdocs/"
- # load all otrs modules
- PerlRequire /opt/otrs/scripts/apache2-perl-startup.pl
+ # Setup environment and preload modules
+ Perlrequire /opt/otrs/scripts/apache2-perl-startup.pl
- # Apache::Reload - Reload Perl Modules when Changed on Disk
- # (slow, use only when necessary)
- #PerlModule Apache2::Reload
- #PerlInitHandler Apache2::Reload
- #PerlModule Apache2::RequestRec
+ # Reload Perl modules when changed on disk
+ PerlModule Apache2::Reload
+ PerlInitHandler Apache2::Reload
- RewriteEngine On
- RewriteRule ^/otrs$ /otrs/index.pl [R=301]
- RewriteRule ^/otrs/$ /otrs/index.pl [R=301]
- RewriteRule ^/$ /otrs/index.pl [R=301]
-
- # Fix incorrect TicketID links (common on Wikipedia)
- RewriteCond %{QUERY_STRING}
^Action=AgentTicketZoom\&TicketID=(200[0-9]{13})$
- RewriteRule ^/otrs/index\.pl
/otrs/index.pl?Action=AgentTicketZoom&TicketNumber=%1 [R]
-
- # set mod_perl2 options
+ # general mod_perl2 options
<Location /otrs>
+ #ErrorDocument 403 /otrs/customer.pl
ErrorDocument 403 /otrs/index.pl
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
@@ -62,4 +50,48 @@
Order allow,deny
Allow from all
</Location>
+
+ # mod_perl2 options for GenericInterface
+ <Location /otrs/nph-genericinterface.pl>
+ PerlOptions -ParseHeaders
+ </Location>
+
+ <Directory "/opt/otrs/bin/cgi-bin/">
+ AllowOverride None
+ Options +ExecCGI -Includes
+ Order allow,deny
+ Allow from all
+
+ <IfModule mod_deflate.c>
+ AddOutputFilterByType DEFLATE text/html text/javascript
text/css text/xml application/json text/json
+ </IfModule>
+ </Directory>
+
+ <Directory "/opt/otrs/var/httpd/htdocs/">
+ AllowOverride None
+ Order allow,deny
+ Allow from all
+
+ <IfModule mod_deflate.c>
+ AddOutputFilterByType DEFLATE text/html text/javascript
text/css text/xml application/json text/json
+ </IfModule>
+ </Directory>
+
+ <IfModule mod_headers.c>
+ <Directory "/opt/otrs/var/httpd/htdocs/skins/*/*/css-cache">
+ <FilesMatch "\.(css|CSS)$">
+ Header set Cache-Control "max-age=2592000
must-revalidate"
+ </FilesMatch>
+ </Directory>
+
+ <Directory "/opt/otrs/var/httpd/htdocs/js/js-cache">
+ <FilesMatch "\.(js|JS)$">
+ Header set Cache-Control "max-age=2592000
must-revalidate"
+ </FilesMatch>
+ </Directory>
+ </IfModule>
+
+ # Limit the number of requests per child to avoid excessive memory usage
+ #MaxRequestsPerChild 4000
+
</VirtualHost>
--
To view, visit https://gerrit.wikimedia.org/r/77912
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I598b8505728ad770e29079ebe708a716b6ee4484
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jgreen <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits