Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
ISPConfig
ISPConfig 3
Commits
befdfb2a
Commit
befdfb2a
authored
Aug 12, 2019
by
Marius Burkard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- added missing rspamd lines in apps vhost template on install
parent
c3e2fd16
Pipeline
#1370
passed with stage
in 2 minutes and 41 seconds
Changes
3
Pipelines
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
1 deletion
+52
-1
install/lib/installer_base.lib.php
install/lib/installer_base.lib.php
+10
-1
install/tpl/apache_apps.vhost.master
install/tpl/apache_apps.vhost.master
+18
-0
install/tpl/nginx_apps.vhost.master
install/tpl/nginx_apps.vhost.master
+24
-0
No files found.
install/lib/installer_base.lib.php
View file @
befdfb2a
...
...
@@ -2226,6 +2226,9 @@ class installer_base {
$tpl
->
setVar
(
'logging'
,
'yes'
);
}
if
(
$conf
[
'rspamd'
][
'installed'
]
==
true
)
{
$tpl
->
setVar
(
'use_rspamd'
,
'yes'
);
}
// comment out the listen directive if port is 80 or 443
if
(
$conf
[
'web'
][
'apps_vhost_ip'
]
==
80
or
$conf
[
'web'
][
'apps_vhost_ip'
]
==
443
)
{
...
...
@@ -2294,6 +2297,12 @@ class installer_base {
$apps_vhost_ip
=
$conf
[
'web'
][
'apps_vhost_ip'
]
.
':'
;
}
if
(
$conf
[
'rspamd'
][
'installed'
]
==
true
)
{
$content
=
str_replace
(
'{use_rspamd}'
,
''
,
$content
);
}
else
{
$content
=
str_replace
(
'{use_rspamd}'
,
'# '
,
$content
);
}
$socket_dir
=
escapeshellcmd
(
$conf
[
'nginx'
][
'php_fpm_socket_dir'
]);
if
(
substr
(
$socket_dir
,
-
1
)
!=
'/'
)
$socket_dir
.
=
'/'
;
if
(
!
is_dir
(
$socket_dir
))
exec
(
'mkdir -p '
.
$socket_dir
);
...
...
install/tpl/apache_apps.vhost.master
View file @
befdfb2a
...
...
@@ -19,6 +19,12 @@
RequestHeader unset Proxy early
</IfModule>
{tmpl_if name="enable_spdy" op="==" value="y"}
<IfModule spdy_module>
SpdyEnabled on
</IfModule>
{/tmpl_if}
<IfModule mod_php5.c>
DocumentRoot {tmpl_var name='apps_vhost_dir'}
AddType application/x-httpd-php .php
...
...
@@ -68,6 +74,18 @@
</Directory>
</IfModule>
{tmpl_if name="use_rspamd"}
<Location /rspamd>
Order allow,deny
Allow from all
</Location>
RewriteEngine On
RewriteRule ^/rspamd$ /rspamd/ [R,L]
RewriteRule ^/rspamd/(.*) http://127.0.0.1:11334/$1 [P]
{/tmpl_if}
</VirtualHost>
install/tpl/nginx_apps.vhost.master
View file @
befdfb2a
...
...
@@ -208,4 +208,28 @@ server {
alias /var/lib/mailman/archives/public;
autoindex on;
}
{use_rspamd}location /rspamd/ {
{use_rspamd}proxy_pass http://127.0.0.1:11334/;
{use_rspamd}rewrite ^//(.*) /$1;
{use_rspamd}proxy_set_header X-Forwarded-Proto $scheme;
{use_rspamd}proxy_set_header Host $host;
{use_rspamd}proxy_set_header X-Real-IP $remote_addr;
{use_rspamd}proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
{use_rspamd}proxy_pass_header Authorization;
{use_rspamd}client_max_body_size 0;
{use_rspamd}client_body_buffer_size 1m;
{use_rspamd}proxy_intercept_errors on;
{use_rspamd}proxy_buffering on;
{use_rspamd}proxy_buffer_size 128k;
{use_rspamd}proxy_buffers 256 16k;
{use_rspamd}proxy_busy_buffers_size 256k;
{use_rspamd}proxy_temp_file_write_size 256k;
{use_rspamd}proxy_max_temp_file_size 0;
{use_rspamd}proxy_read_timeout 300;
{use_rspamd}
{use_rspamd}location ~* ^/rspamd/(.+\.(jpg|jpeg|gif|css|png|js|ico|html?|xml|txt))$ {
{use_rspamd}alias /usr/share/rspamd/www/$1;
{use_rspamd}}
{use_rspamd}}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment