File: 08-usable-apache-config.diff

package info (click to toggle)
znuny 6.5.16-1
  • links: PTS
  • area: non-free
  • in suites: forky, sid
  • size: 205,340 kB
  • sloc: perl: 1,038,642; xml: 74,551; javascript: 65,272; sql: 23,574; sh: 417; makefile: 63
file content (100 lines) | stat: -rw-r--r-- 3,578 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# Create a usable Apache configuration with mod_perl for Debian.

diff -Naur Znuny-rel-6_5_14.orig/scripts/apache2-httpd.include.conf Znuny-rel-6_5_14/scripts/apache2-httpd.include.conf
--- Znuny-rel-6_5_14.orig/scripts/apache2-httpd.include.conf	2025-02-19 10:29:29.000000000 +0100
+++ Znuny-rel-6_5_14/scripts/apache2-httpd.include.conf	2025-02-21 17:17:45.244091450 +0100
@@ -2,13 +2,13 @@
 # added for OTRS (http://otrs.org/)
 # --
 
-ScriptAlias /otrs/ "/opt/otrs/bin/cgi-bin/"
-Alias /otrs-web/ "/opt/otrs/var/httpd/htdocs/"
+ScriptAlias /otrs "/usr/share/otrs/bin/cgi-bin/"
+Alias /otrs-web "/usr/share/otrs/var/httpd/htdocs/"
 
 <IfModule mod_perl.c>
 
     # Setup environment and preload modules
-    Perlrequire /opt/otrs/scripts/apache2-perl-startup.pl
+    Perlrequire /usr/share/otrs/scripts/apache2-perl-startup.pl
 
     # Reload Perl modules when changed on disk
     PerlModule Apache2::Reload
@@ -18,9 +18,10 @@
     <Location /otrs>
 #        ErrorDocument 403 /otrs/customer.pl
         ErrorDocument 403 /otrs/index.pl
+		ErrorDocument 404 /otrs/index.pl
         SetHandler  perl-script
         PerlResponseHandler ModPerl::Registry
-        Options +ExecCGI
+        Options +ExecCGI +FollowSymLinks
         PerlOptions +ParseHeaders
         PerlOptions +SetupEnv
 
@@ -46,7 +47,7 @@
 
 </IfModule>
 
-<Directory "/opt/otrs/bin/cgi-bin/">
+<Directory "/usr/share/otrs/bin/cgi-bin/">
     AllowOverride None
     Options +ExecCGI -Includes
 
@@ -72,7 +73,7 @@
 
 </Directory>
 
-<Directory "/opt/otrs/var/httpd/htdocs/">
+<Directory "/usr/share/otrs/var/httpd/htdocs/">
     AllowOverride None
 
     <IfModule mod_version.c>
@@ -123,7 +124,7 @@
 # </Location>
 
 <IfModule mod_headers.c>
-    <Directory "/opt/otrs/var/httpd/htdocs">
+    <Directory "/usr/share/otrs/var/httpd/htdocs">
         Header set X-Frame-Options "SAMEORIGIN"
         Header set Content-Security-Policy "default-src 'self' 'unsafe-inline' 'unsafe-eval' data: blob:; img-src * 'unsafe-inline' 'unsafe-eval' data: blob:"
         Header set X-Content-Type-Options "nosniff"
@@ -131,28 +132,28 @@
     </Directory>
 
     # Cache css-cache for 30 days
-    <Directory "/opt/otrs/var/httpd/htdocs/skins/*/*/css-cache">
+    <Directory "/usr/share/otrs/var/httpd/htdocs/skins/*/*/css-cache">
         <FilesMatch "\.(css|CSS)$">
             Header set Cache-Control "max-age=2592000, must-revalidate"
         </FilesMatch>
     </Directory>
 
     # Cache css thirdparty for 4 hours, including icon fonts
-    <Directory "/opt/otrs/var/httpd/htdocs/skins/*/*/css/thirdparty">
+    <Directory "/usr/share/otrs/var/httpd/htdocs/skins/*/*/css/thirdparty">
         <FilesMatch "\.(css|CSS|woff|svg)$">
             Header set Cache-Control "max-age=14400, must-revalidate"
         </FilesMatch>
     </Directory>
 
     # Cache js-cache for 30 days
-    <Directory "/opt/otrs/var/httpd/htdocs/js/js-cache">
+    <Directory "/usr/share/otrs/var/httpd/htdocs/js/js-cache">
         <FilesMatch "\.(js|JS)$">
             Header set Cache-Control "max-age=2592000, must-revalidate"
         </FilesMatch>
     </Directory>
 
     # Cache js thirdparty for 4 hours
-    <Directory "/opt/otrs/var/httpd/htdocs/js/thirdparty/">
+    <Directory "/usr/share/otrs/var/httpd/htdocs/js/thirdparty/">
         <FilesMatch "\.(js|JS)$">
             Header set Cache-Control "max-age=14400, must-revalidate"
         </FilesMatch>
@@ -160,4 +161,4 @@
 </IfModule>
 
 # Limit the number of requests per child to avoid excessive memory usage
-MaxRequestsPerChild 4000
+#MaxRequestsPerChild 4000