| File samples/rg.conf changed (mode: 100644) (index c984617..b07b51b) |
| 13 |
13 |
# Cache at will |
# Cache at will |
| 14 |
14 |
<FilesMatch "(?i)^.*\.(ico|jpg|jpeg|png|gif|js|css)$"> |
<FilesMatch "(?i)^.*\.(ico|jpg|jpeg|png|gif|js|css)$"> |
| 15 |
15 |
FileETag MTime Size |
FileETag MTime Size |
|
16 |
|
<IfModule mod_expires.c> |
|
17 |
|
ExpiresActive On |
|
18 |
|
ExpiresDefault "access plus 1 day" |
|
19 |
|
</IfModule> |
| 16 |
20 |
</FilesMatch> |
</FilesMatch> |
| 17 |
|
|
|
| 18 |
|
<IfModule mod_expires.c> |
|
| 19 |
|
ExpiresActive On |
|
| 20 |
|
ExpiresByType image/vnd.microsoft.icon "access plus 7 days" |
|
| 21 |
|
ExpiresByType image/png "access plus 1 day" |
|
| 22 |
|
ExpiresByType text/css "access plus 1 day" |
|
| 23 |
|
ExpiresByType text/javascript "access plus 1 day" |
|
| 24 |
|
ExpiresByType application/javascript "access plus 1 day" |
|
| 25 |
|
ExpiresByType application/x-javascript "access plus 1 day" |
|
| 26 |
|
</IfModule> |
|
| 27 |
21 |
</Directory> |
</Directory> |
| 28 |
22 |
|
|
| 29 |
23 |
<VirtualHost *:80> |
<VirtualHost *:80> |
| 30 |
24 |
# Set ServerName correctly, else, this VirtualHost will not match |
# Set ServerName correctly, else, this VirtualHost will not match |
| 31 |
25 |
#ServerName rg.domain.tld |
#ServerName rg.domain.tld |
| 32 |
|
#ServerAlias rg www.rg.domain.tld |
|
|
26 |
|
#ServerAlias rg www.rg.domain.tld x.domain.tld y.domain.tld |
| 33 |
27 |
|
|
| 34 |
28 |
DocumentRoot /usr/share/rocketgit/root/ |
DocumentRoot /usr/share/rocketgit/root/ |
| 35 |
29 |
ErrorLog logs/rocketgit-error_log |
ErrorLog logs/rocketgit-error_log |
| 36 |
|
CustomLog logs/rocketgit-access_log common |
|
|
30 |
|
CustomLog logs/rocketgit-access_log combined |
| 37 |
31 |
|
|
| 38 |
32 |
KeepAlive On |
KeepAlive On |
| 39 |
33 |
MaxKeepAliveRequests 1000 |
MaxKeepAliveRequests 1000 |
| |
| 42 |
36 |
ServerSignature Off |
ServerSignature Off |
| 43 |
37 |
UseCanonicalName On |
UseCanonicalName On |
| 44 |
38 |
UseCanonicalPhysicalPort On |
UseCanonicalPhysicalPort On |
|
39 |
|
LogLevel info |
| 45 |
40 |
|
|
| 46 |
41 |
RewriteEngine On |
RewriteEngine On |
|
42 |
|
#LogLevel rewrite:trace8 |
| 47 |
43 |
|
|
| 48 |
44 |
# Allow .ico, 'themes' folder and robots.txt |
# Allow .ico, 'themes' folder and robots.txt |
| 49 |
45 |
# Also, avoid scripts that are looking for exploits |
# Also, avoid scripts that are looking for exploits |
| |
| 52 |
48 |
|
|
| 53 |
49 |
# Force the use of only one name even if we have more aliases. |
# Force the use of only one name even if we have more aliases. |
| 54 |
50 |
# https://httpd.apache.org/docs/2.4/rewrite/remapping.html |
# https://httpd.apache.org/docs/2.4/rewrite/remapping.html |
| 55 |
|
#RewriteCond "%{HTTP_HOST}" "!^%{SERVER_NAME}$" [nocase,ornext] |
|
| 56 |
|
#RewriteCond "%{HTTP_PORT}" "!^%{SERVER_PORT}$" [nocase] |
|
|
51 |
|
#RewriteCond expr "%{HTTP_HOST} != %{SERVER_NAME}" |
| 57 |
52 |
#RewriteRule "^/?(.*)" "http://%{SERVER_NAME}:%{SERVER_PORT}/$1" [last,redirect=301,noescape] |
#RewriteRule "^/?(.*)" "http://%{SERVER_NAME}:%{SERVER_PORT}/$1" [last,redirect=301,noescape] |
| 58 |
53 |
|
|
| 59 |
54 |
# all rest |
# all rest |
| |
| 75 |
70 |
</VirtualHost> |
</VirtualHost> |
| 76 |
71 |
|
|
| 77 |
72 |
<VirtualHost *:443> |
<VirtualHost *:443> |
| 78 |
|
#LogLevel debug #rewrite:trace8 |
|
| 79 |
73 |
# Set ServerName correctly, else, this VirtualHost will not match |
# Set ServerName correctly, else, this VirtualHost will not match |
| 80 |
74 |
#ServerName rg.domain.tld |
#ServerName rg.domain.tld |
| 81 |
75 |
#ServerAlias rg www.rg.domain.tld |
#ServerAlias rg www.rg.domain.tld |
| 82 |
76 |
|
|
| 83 |
77 |
DocumentRoot /usr/share/rocketgit/root/ |
DocumentRoot /usr/share/rocketgit/root/ |
| 84 |
78 |
ErrorLog logs/rocketgit-ssl_error_log |
ErrorLog logs/rocketgit-ssl_error_log |
| 85 |
|
CustomLog logs/rocketgit-ssl_request_log \ |
|
| 86 |
|
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" |
|
| 87 |
|
TransferLog logs/rocketgit-ssl_access_log |
|
|
79 |
|
CustomLog logs/rocketgit-ssl_access_log combined |
| 88 |
80 |
|
|
| 89 |
81 |
KeepAlive On |
KeepAlive On |
| 90 |
82 |
MaxKeepAliveRequests 1000 |
MaxKeepAliveRequests 1000 |
| |
| 93 |
85 |
ServerSignature Off |
ServerSignature Off |
| 94 |
86 |
UseCanonicalName On |
UseCanonicalName On |
| 95 |
87 |
UseCanonicalPhysicalPort On |
UseCanonicalPhysicalPort On |
|
88 |
|
LogLevel info |
| 96 |
89 |
|
|
| 97 |
90 |
RewriteEngine On |
RewriteEngine On |
|
91 |
|
#LogLevel rewrite:trace8 |
| 98 |
92 |
|
|
| 99 |
93 |
# Allow .ico, 'themes' folder and robots.txt |
# Allow .ico, 'themes' folder and robots.txt |
| 100 |
94 |
RewriteCond %{REQUEST_URI} ^/(favicon\.ico|themes/.*|robots\.txt|\.well-known/.*)$ |
RewriteCond %{REQUEST_URI} ^/(favicon\.ico|themes/.*|robots\.txt|\.well-known/.*)$ |
| |
| 102 |
96 |
|
|
| 103 |
97 |
# Force the use of only one name even if we have more aliases. |
# Force the use of only one name even if we have more aliases. |
| 104 |
98 |
# https://httpd.apache.org/docs/2.4/rewrite/remapping.html |
# https://httpd.apache.org/docs/2.4/rewrite/remapping.html |
| 105 |
|
#RewriteCond "%{HTTP_HOST}" "!^%{SERVER_NAME}$" [nocase,ornext] |
|
| 106 |
|
#RewriteCond "%{HTTP_PORT}" "!^%{SERVER_PORT}$" [nocase] |
|
|
99 |
|
#RewriteCond expr "%{HTTP_HOST} != %{SERVER_NAME}" |
| 107 |
100 |
#RewriteRule "^/?(.*)" "https://%{SERVER_NAME}:%{SERVER_PORT}/$1" [last,redirect=301,noescape] |
#RewriteRule "^/?(.*)" "https://%{SERVER_NAME}:%{SERVER_PORT}/$1" [last,redirect=301,noescape] |
| 108 |
101 |
|
|
| 109 |
102 |
# all rest |
# all rest |