Compare commits
6 Commits
0.2.22_el5
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
87cd0ecd69 | ||
|
aff38fdd3e | ||
|
c30e43f6cd | ||
|
a72f708874 | ||
|
7a5c42f80e | ||
|
54d1207b98 |
|
@ -12,4 +12,10 @@ if ( -e '/usr/lib64/httpd/modules/mod_authnz_ldap.so' ||
|
|||
$OUT .= "LoadModule authnz_ldap_module modules/mod_authnz_ldap.so\n";
|
||||
}
|
||||
|
||||
# Load wstunnel if available
|
||||
if ( -e '/usr/lib64/httpd/modules/mod_proxy_wstunnel.so' ||
|
||||
-e '/usr/lib/httpd/modules/mod_proxy_wstunnel.so'){
|
||||
$OUT .= "LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -19,6 +19,19 @@ my $auth = $domain->prop('Authentication') || 'none';
|
|||
my @groups = split(/[;,]/, ($domain->prop('AllowGroups') || ''));
|
||||
my $ssl_port = $modSSL{'TCPPort'} || '443';
|
||||
my $proto = ($port eq $ssl_port ) ? 'https' : 'http';
|
||||
my $socketio = $domain->prop('ProxySocketIO') || 'disabled';
|
||||
my @proxyrules = split /[,;]/, ($domain->prop('ProxyPassRules') || '');
|
||||
|
||||
# Custom proxypass rules
|
||||
foreach my $rule (@proxyrules){
|
||||
my ($from, $to) = split /=/, $rule;
|
||||
$OUT .= " ProxyPass $from $to\n";
|
||||
}
|
||||
|
||||
if (@proxyrules > 0 || $target =~ m|https?://[\d\w\.\-/]*|){
|
||||
$OUT .= " ProxyPreserveHost on\n" if ($preserve eq 'yes');
|
||||
$OUT .= " RequestHeader set X-Forwarded-Proto \"$proto\"\n";
|
||||
}
|
||||
|
||||
# ProxyPass ?
|
||||
if ($target =~ m|https?://[\d\w\.\-/]*|){
|
||||
|
@ -31,11 +44,29 @@ if ($target =~ m|https?://[\d\w\.\-/]*|){
|
|||
if ($proxy_acme eq 'disabled'){
|
||||
$OUT .= " ProxyPass /.well-known/acme-challenge/ !\n";
|
||||
}
|
||||
if ($socketio eq 'enabled'){
|
||||
# Try to handle Socket.IO
|
||||
my $wstarget = $target;
|
||||
$wstarget =~ s/^http:/ws:/;
|
||||
$wstarget =~ s/^https:/wss:/;
|
||||
$OUT .=<<"_EOF"
|
||||
|
||||
<IfModule mod_proxy_wstunnel.c>
|
||||
RewriteCond %{QUERY_STRING} transport=polling [NC]
|
||||
RewriteRule /socket.io/(.*) ${target}socket.io/\$1 [P,L]
|
||||
|
||||
ProxyPass /socket.io/socket.io.js ${target}socket.io/socket.io.js
|
||||
ProxyPassReverse /socket.io/socket.io.js ${target}socket.io/socket.io.js
|
||||
|
||||
ProxyPass /socket.io/ ${wstarget}socket.io/
|
||||
ProxyPassReverse /socket.io/ ${wstarget}socket.io/
|
||||
</IfModule>
|
||||
|
||||
_EOF
|
||||
}
|
||||
$OUT .= " ProxyPass / $target\n";
|
||||
$OUT .= " ProxyPassReverse / $target\n";
|
||||
}
|
||||
$OUT .= " ProxyPreserveHost on\n" if ($preserve eq 'yes');
|
||||
$OUT .= " RequestHeader set X-Forwarded-Proto \"$proto\"\n";
|
||||
}
|
||||
# Rewrite ?
|
||||
elsif ($rewrite =~ m|https?://[\d\w\.\-/]*|){
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Summary: Common WebApps Framework for SME Server
|
||||
%define name smeserver-webapps-common
|
||||
Name: %{name}
|
||||
%define version 0.2.21
|
||||
%define version 0.3.2
|
||||
%define release 1
|
||||
Version: %{version}
|
||||
Release: %{release}%{?dist}
|
||||
|
@ -12,20 +12,39 @@ Source: %{name}-%{version}.tar.gz
|
|||
|
||||
URL: http://www.firewall-services.com/
|
||||
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot
|
||||
BuildArchitectures: noarch
|
||||
Requires: e-smith-base
|
||||
Requires: e-smith-apache >= 2.2.0-11
|
||||
Requires: httpd
|
||||
Requires: mysql
|
||||
Requires: php
|
||||
Requires: openssl-perl
|
||||
Requires: mod_proxy_wstunnel
|
||||
BuildRequires: e-smith-devtools
|
||||
|
||||
%ifarch x86_64
|
||||
Requires: smeserver-php-fpm
|
||||
%endif
|
||||
|
||||
%description
|
||||
This package provide common files and events for Web Applications integration
|
||||
on SME Server
|
||||
|
||||
%changelog
|
||||
* Sun Oct 1 2017 Daniel Berteaud <daniel@firewall-services.com> 0.3.2-1.sme
|
||||
- Allow per domain custom ProxyPass rules using ProxyPassRules db prop
|
||||
|
||||
* Thu Jul 27 2017 Daniel Berteaud <daniel@firewall-services.com> 0.3.1-1.sme
|
||||
- Support Socket.IO websocket proxying
|
||||
|
||||
* Wed Jul 26 2017 Daniel Berteaud <daniel@firewall-services.com> 0.3.0-1.sme
|
||||
- Requires smeserver-php-fpm on x86_64
|
||||
|
||||
* Mon Dec 12 2016 Daniel Berteaud <daniel@firewall-services.com> 0.2.23-1.sme
|
||||
- Fix syntax error introduce with X-Forwarded-Proto
|
||||
|
||||
* Sun Dec 11 2016 Daniel Berteaud <daniel@firewall-services.com> 0.2.22-1.sme
|
||||
- Set X-Forwarded-Proto for proxypass vhosts
|
||||
|
||||
* Mon Oct 24 2016 Daniel Berteaud <daniel@firewall-services.com> 0.2.21-1.sme
|
||||
- Skip rewrites for ACME challenges
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user