From e18b4c86c999102eae60bc543f88baea452fd210 Mon Sep 17 00:00:00 2001 From: James Rouzier Date: Thu, 11 May 2023 12:49:52 +0000 Subject: [PATCH] Remove httpd.proxy --- conf/I18N/api/en.po | 4 - conf/I18N/api/fr.po | 8 - conf/documentation.conf | 7 - conf/httpd.conf.d/httpd.proxy.tt.example | 221 ------------------ conf/log.conf.d/httpd.proxy.conf.example | 14 -- conf/pf.conf.defaults | 5 - conf/systemd/packetfence-httpd.proxy.service | 22 -- debian/packetfence.conffiles | 1 - debian/patches/debianize.patch | 26 --- debian/rules | 1 - .../spec/components/schemas/configbase.yaml | 4 - go/caddy/log-tailer/logmeta.go | 2 - go/pfconfigdriver/structs.go | 1 - html/pfappserver/lib/pfappserver/I18N/en.po | 10 - html/pfappserver/lib/pfappserver/I18N/fr.po | 12 - .../services/_components/TheForm.vue | 5 - lib/pf/cmd/pf/service.pm | 1 - lib/pf/constants/syslog.pm | 1 - lib/pf/services/manager/httpd_proxy.pm | 74 ------ lib/pf/web/proxy_modperl_require.pl | 47 ---- rpm/packetfence.spec | 3 - 21 files changed, 469 deletions(-) delete mode 100644 conf/httpd.conf.d/httpd.proxy.tt.example delete mode 100644 conf/log.conf.d/httpd.proxy.conf.example delete mode 100644 conf/systemd/packetfence-httpd.proxy.service delete mode 100644 lib/pf/services/manager/httpd_proxy.pm delete mode 100644 lib/pf/web/proxy_modperl_require.pl diff --git a/conf/I18N/api/en.po b/conf/I18N/api/en.po index 7d444979c29a..c32df3fd0e58 100644 --- a/conf/I18N/api/en.po +++ b/conf/I18N/api/en.po @@ -13956,10 +13956,6 @@ msgstr "" msgid "Should httpd.portal be started? Keep enabled unless you know what you're doing." msgstr "" -#: html/pfappserver/root/src/views/Configuration/services/_components/TheForm.vue:65 -msgid "Should httpd.proxy be started? Keep enabled unless you know what you're doing." -msgstr "" - #: html/pfappserver/root/src/views/Configuration/services/_components/TheForm.vue:70 msgid "Should httpd.webservices be started? Keep enabled unless you know what you're doing." msgstr "" diff --git a/conf/I18N/api/fr.po b/conf/I18N/api/fr.po index 9d28c0bbefa2..b5bb1d945235 100644 --- a/conf/I18N/api/fr.po +++ b/conf/I18N/api/fr.po @@ -15308,14 +15308,6 @@ msgstr "" "Est-ce que httpd.portal doit être démarré ? Gardez le activé sauf si vous " "savez ce que vous faites." -#: html/pfappserver/root/src/views/Configuration/services/_components/TheForm.vue:65 -msgid "" -"Should httpd.proxy be started? Keep enabled unless you know what you're " -"doing." -msgstr "" -"Est-ce que https.proxy doit être démarré ? Gardez le activé sauf si vous " -"savez ce que vous faites." - #: html/pfappserver/root/src/views/Configuration/services/_components/TheForm.vue:70 msgid "" "Should httpd.webservices be started? Keep enabled unless you know what " diff --git a/conf/documentation.conf b/conf/documentation.conf index 63e6e5148341..5f4d0412b2fa 100644 --- a/conf/documentation.conf +++ b/conf/documentation.conf @@ -287,13 +287,6 @@ description=< - - LoadModule perl_module /usr/lib/apache2/modules/mod_perl.so - - [% IF apache_version == "2.4" %] - - LoadModule unixd_module /usr/lib/apache2/modules/mod_unixd.so - - - LoadModule authz_core_module /usr/lib/apache2/modules/mod_authz_core.so - - - LoadModule authn_core_module /usr/lib/apache2/modules/mod_authn_core.so - - - LoadModule socache_shmcb_module /usr/lib/apache2/modules/mod_socache_shmcb.so - - - LoadModule mpm_prefork_module /usr/lib/apache2/modules/mod_mpm_prefork.so - - [% END %] - - LoadModule log_config_module /usr/lib/apache2/modules/mod_log_config.so - - - LoadModule logio_module /usr/lib/apache2/modules/mod_logio.so - - - LoadModule ssl_module /usr/lib/apache2/modules/mod_ssl.so - - - LoadModule alias_module /usr/lib/apache2/modules/mod_alias.so - - - LoadModule mime_module /usr/lib/apache2/modules/mod_mime.so - - - LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so - - - LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so - - - LoadModule apreq_module /usr/lib/apache2/modules/mod_apreq2.so - - - LoadModule headers_module /usr/lib/apache2/modules/mod_headers.so - - - LoadModule systemd_module /usr/lib/apache2/modules/mod_systemd.so - - - LoadModule proxy_connect_module /usr/lib/apache2/modules/mod_proxy_connect.so - - - -#RHEL specific - - - LoadModule perl_module modules/mod_perl.so - - [% IF apache_version == "2.4" %] - - LoadModule unixd_module modules/mod_unixd.so - - - LoadModule authz_core_module modules/mod_authz_core.so - - - LoadModule authn_core_module modules/mod_authn_core.so - - - LoadModule mpm_prefork_module modules/mod_mpm_prefork.so - - - LoadModule socache_shmcb_module modules/mod_socache_shmcb.so - - [% END %] - - LoadModule log_config_module modules/mod_log_config.so - - - LoadModule logio_module modules/mod_logio.so - - - LoadModule ssl_module modules/mod_ssl.so - - - LoadModule alias_module modules/mod_alias.so - - - LoadModule mime_module modules/mod_mime.so - - - LoadModule proxy_module modules/mod_proxy.so - - - LoadModule proxy_http_module modules/mod_proxy_http.so - - - LoadModule apreq_module modules/mod_apreq2.so - - - LoadModule headers_module modules/mod_headers.so - - - LoadModule systemd_module modules/mod_systemd.so - - - LoadModule proxy_connect_module modules/mod_proxy_connect.so - - - -[% IF apache_version == "2.4" %] -Mutex posixsem default -[% ELSE %] -AcceptMutex posixsem -[% END %] - -PerlSwitches -I[% install_dir %]/lib -PerlSwitches -I[% install_dir %]/lib_perl/lib/perl5 -PerlLoadModule pf::WebAPI::InitHandler -PerlPostConfigHandler pf::WebAPI::InitHandler->post_config -PerlChildInitHandler pf::WebAPI::InitHandler->child_init -PidFile [% install_dir %]/var/run/[% name %].pid -Include [% install_dir %]/conf/httpd.conf.d/log.conf -User pf -Group pf -TypesConfig /etc/mime.types -ServerTokens Prod -ServerSignature Off -UseCanonicalName Off -Timeout 50 -KeepAliveTimeout 10 - -MaxClients 4 -StartServers 2 -MinSpareServers 1 -HostnameLookups off -MaxRequestsPerChild 1000 - -SSLPassPhraseDialog builtin -SSLSessionCacheTimeout 300 -SSLRandomSeed startup builtin -SSLRandomSeed startup file:/dev/urandom 1024 -SSLRandomSeed connect builtin -SSLRandomSeed connect file:/dev/urandom 1024 - -[% IF apache_version == "2.4" %] -SSLSessionCache shmcb:[% install_dir %]/var/ssl_acache(512000) -Mutex file:[% install_dir %]/var/ssl_mutex ssl-cache -# apache 2.4.6 | modern profile | OpenSSL 1.0.1e | https://mozilla.github.io/server-side-tls/ssl-config-generator/?server=apache-2.4.6&openssl=1.0.1e&hsts=no&profile=modern -#Oldest compatible clients: Firefox 27, Chrome 30, IE 11 on Windows 7, Edge, Opera 17, Safari 9, Android 5.0, and Java 8 -SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1 -SSLCipherSuite ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256 -SSLHonorCipherOrder on -SSLCompression off -[% END %] - -SSLHonorCipherOrder on - -ErrorLog "| /usr/bin/logger -thttpd_proxy_err -plocal5.err" - -ServerAdmin [% server_admin %] - -TraceEnable Off - -[% IF apache_version == "2.2" %] -NameVirtualHost *:[% port %] -[% END %] - -#disable htaccess starting at web root - - AllowOverride None - - -Listen 127.0.0.1:[% port %] - - - ServerName [% server_name %] - PerlOptions +GlobalRequest - SSLEngine on - SSLProxyEngine on - Include [% var_dir %]/conf/ssl-certificates.conf - PerlModule pf::web::interceptproxy - PerlTransHandler +pf::web::interceptproxy::reverse - ProxyRequests off - ProxyPreserveHost on - ProxyVia off - LogLevel error - ErrorLog "| /usr/bin/logger -thttpd_proxy_err -plocal5.err" - CustomLog "| /usr/bin/logger -thttpd_proxy -plocal5.info" combined - - -[% FOREACH vhost IN vhosts %] -[% FOREACH proxy_port IN proxy_ports %] - -[% IF apache_version == "2.2" %] -NameVirtualHost [% vhost %]:[% proxy_port %] -[% END %] - -Listen [% vhost %]:[% proxy_port %] - - - ServerName [% server_name %] - PerlOptions +GlobalRequest - PerlModule pf::web::interceptproxy - PerlTransHandler +pf::web::interceptproxy::translate - ProxyRequests On - ProxyPreserveHost On - AllowCONNECT 444 443 - ProxyVia full - ErrorLog "| /usr/bin/logger -thttpd_proxy_err -plocal5.err" - CustomLog "| /usr/bin/logger -thttpd_proxy -plocal5.info" combined - - -[% END %] -[% END %] diff --git a/conf/log.conf.d/httpd.proxy.conf.example b/conf/log.conf.d/httpd.proxy.conf.example deleted file mode 100644 index 1ddeedf986fc..000000000000 --- a/conf/log.conf.d/httpd.proxy.conf.example +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (C) Inverse inc. -### httpd.proxy logger ### -log4perl.rootLogger = sub { ($ENV{LOG_LEVEL} || 'INFO' ) . ", HTTPD_PROXY" } - -### Categories ### -# Below, you can specify different categories (based on package names) for different logging levels -#log4perl.category.pf.SNMP = WARN - -### Logging for httpd.proxy -log4perl.appender.HTTPD_PROXY = Log::Dispatch::Syslog -log4perl.appender.HTTPD_PROXY.ident = httpd_proxy -log4perl.appender.HTTPD_PROXY.facility = local5 -log4perl.appender.HTTPD_PROXY.layout.ConversionPattern = %X{proc}(%X{tid}) %p: [mac:%X{mac}] %m (%M)%n -log4perl.appender.HTTPD_PROXY.layout = PatternLayout diff --git a/conf/pf.conf.defaults b/conf/pf.conf.defaults index 36275738766c..ba513e50f7d3 100644 --- a/conf/pf.conf.defaults +++ b/conf/pf.conf.defaults @@ -531,11 +531,6 @@ httpd_admin_dispatcher=enabled # Should httpd.aaa be started? httpd_aaa=enabled # -# services.httpd_proxy -# -# Should httpd.proxy be started? -httpd_proxy=enabled -# # services.httpd_binary # # Location of the apache binary. Only necessary to change if you are not running the RPMed version. diff --git a/conf/systemd/packetfence-httpd.proxy.service b/conf/systemd/packetfence-httpd.proxy.service deleted file mode 100644 index 8399433b7744..000000000000 --- a/conf/systemd/packetfence-httpd.proxy.service +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (C) Inverse inc. -[Unit] -Description=PacketFence Proxy Apache HTTP Server -Documentation=man:httpd(8) -Documentation=man:apachectl(8) -Wants=packetfence-base.target packetfence-config.service packetfence-iptables.service -After=packetfence-base.target packetfence-config.service packetfence-iptables.service - -[Service] -StartLimitBurst=3 -StartLimitInterval=10 -Type=notify -ExecStartPre=/usr/bin/rm -f /usr/local/pf/var/run/httpd.proxy.pid -ExecStartPre=/bin/perl -I/usr/local/pf/lib -I/usr/local/pf/lib_perl/lib/perl5 '-Mpf::services::manager::httpd_proxy' -e 'pf::services::manager::httpd_proxy->new()->generateConfig()' -ExecStart=/usr/sbin/httpd -f /usr/local/pf/var/conf/httpd.conf.d/httpd.proxy -DFOREGROUND -Drhel -ExecReload=/bin/kill -USR1 ${MAINPID} -PrivateTmp=true -Restart=on-failure -Slice=packetfence.slice - -[Install] -WantedBy=packetfence.target diff --git a/debian/packetfence.conffiles b/debian/packetfence.conffiles index f49c2f0d24b8..f85601c0a088 100644 --- a/debian/packetfence.conffiles +++ b/debian/packetfence.conffiles @@ -71,7 +71,6 @@ /usr/local/pf/conf/httpd.conf.d/httpd.aaa.tt /usr/local/pf/conf/httpd.conf.d/httpd.collector.tt /usr/local/pf/conf/httpd.conf.d/httpd.portal.tt -/usr/local/pf/conf/httpd.conf.d/httpd.proxy.tt /usr/local/pf/conf/httpd.conf.d/log.conf /usr/local/pf/conf/radiusd/acct.conf /usr/local/pf/conf/radiusd/auth.conf diff --git a/debian/patches/debianize.patch b/debian/patches/debianize.patch index da6abd4d76d7..d0f9f3607117 100644 --- a/debian/patches/debianize.patch +++ b/debian/patches/debianize.patch @@ -24,15 +24,6 @@ index 5492ed51f1..d2237bc88e 100644 # # services.radiusd_acct # -@@ -518,7 +518,7 @@ httpd_proxy=enabled - # services.httpd_binary - # - # Location of the apache binary. Only necessary to change if you are not running the RPMed version. --httpd_binary=/usr/sbin/httpd -+httpd_binary=/usr/sbin/apache2 - # - # services.snmptrapd - # @@ -616,7 +616,7 @@ openssl_binary=/usr/bin/openssl # services.arp_binary # @@ -83,23 +74,6 @@ index 59bbf12796..e06af92d10 100644 ExecReload=/bin/kill -USR1 ${MAINPID} ExecStop=/bin/kill -WINCH ${MAINPID} # We want systemd to give httpd some time to finish gracefully, but still want -diff --git a/conf/systemd/packetfence-httpd.proxy.service b/conf/systemd/packetfence-httpd.proxy.service -index 8399433b77..078e1c5e64 100644 ---- a/conf/systemd/packetfence-httpd.proxy.service -+++ b/conf/systemd/packetfence-httpd.proxy.service -@@ -10,9 +10,9 @@ After=packetfence-base.target packetfence-config.service packetfence-iptables.se - StartLimitBurst=3 - StartLimitInterval=10 - Type=notify --ExecStartPre=/usr/bin/rm -f /usr/local/pf/var/run/httpd.proxy.pid --ExecStartPre=/bin/perl -I/usr/local/pf/lib -I/usr/local/pf/lib_perl/lib/perl5 '-Mpf::services::manager::httpd_proxy' -e 'pf::services::manager::httpd_proxy->new()->generateConfig()' --ExecStart=/usr/sbin/httpd -f /usr/local/pf/var/conf/httpd.conf.d/httpd.proxy -DFOREGROUND -Drhel -+ExecStartPre=/bin/rm -f /usr/local/pf/var/run/httpd.proxy.pid -+ExecStartPre=/usr/bin/perl -I/usr/local/pf/lib -I/usr/local/pf/lib_perl/lib/perl5 '-Mpf::services::manager::httpd_proxy' -e 'pf::services::manager::httpd_proxy->new()->generateConfig()' -+ExecStart=/usr/sbin/apache2 -f /usr/local/pf/var/conf/httpd.conf.d/httpd.proxy -DFOREGROUND -Ddebian - ExecReload=/bin/kill -USR1 ${MAINPID} - PrivateTmp=true - Restart=on-failure diff --git a/conf/systemd/packetfence-iptables.service b/conf/systemd/packetfence-iptables.service index a3ac735600..be76136201 100644 --- a/conf/systemd/packetfence-iptables.service diff --git a/debian/rules b/debian/rules index 61eb377ee27c..d3f58e259a37 100755 --- a/debian/rules +++ b/debian/rules @@ -213,7 +213,6 @@ binary-arch: build install dh_installinit --name=packetfence-httpd.dispatcher dh_installinit --name=packetfence-httpd.admin_dispatcher dh_installinit --name=packetfence-httpd.portal - dh_installinit --name=packetfence-httpd.proxy dh_installinit --name=packetfence-httpd.webservices dh_installinit --name=packetfence-docker-iptables dh_installinit --name=packetfence-iptables diff --git a/docs/api/spec/components/schemas/configbase.yaml b/docs/api/spec/components/schemas/configbase.yaml index 10c0a236ce1b..9be329131e19 100644 --- a/docs/api/spec/components/schemas/configbase.yaml +++ b/docs/api/spec/components/schemas/configbase.yaml @@ -583,10 +583,6 @@ ConfigBase: description: Should httpd.portal be started? Keep enabled unless you know what you're doing. type: string - httpd_proxy: - description: Should httpd.proxy be started? Keep enabled unless you know what - you're doing. - type: string httpd_webservices: description: Should httpd.webservices be started? Keep enabled unless you know what you're doing. diff --git a/go/caddy/log-tailer/logmeta.go b/go/caddy/log-tailer/logmeta.go index b993dc2d8447..d49c6a2ebc8d 100644 --- a/go/caddy/log-tailer/logmeta.go +++ b/go/caddy/log-tailer/logmeta.go @@ -105,8 +105,6 @@ func NewRsyslogMetaEngine() *LogMetaEngine { "httpd_collector_err": &apacheErrorMetaExtractor, "httpd_portal_access": &apacheAccessMetaExtractor, "httpd_portal_err": &apacheErrorMetaExtractor, - "httpd_proxy_access": &apacheAccessMetaExtractor, - "httpd_proxy_err": &apacheErrorMetaExtractor, "httpd_webservices_access": &apacheAccessMetaExtractor, "httpd_webservices_err": &apacheErrorMetaExtractor, "load_balancer": &freeradiusMetaExtractor, diff --git a/go/pfconfigdriver/structs.go b/go/pfconfigdriver/structs.go index 0ced6374fa99..81c08dfb9baf 100644 --- a/go/pfconfigdriver/structs.go +++ b/go/pfconfigdriver/structs.go @@ -191,7 +191,6 @@ type PfConfServices struct { HttpdAdminDispatcher string `json:"httpd_admin_dispatcher"` HttpdDispatcher string `json:"httpd_dispatcher"` HttpdPortal string `json:"httpd_portal"` - HttpdProxy string `json:"httpd_proxy"` HttpdWebservices string `json:"httpd_webservices"` Iptables string `json:"iptables"` Keepalived string `json:"keepalived"` diff --git a/html/pfappserver/lib/pfappserver/I18N/en.po b/html/pfappserver/lib/pfappserver/I18N/en.po index c13d123c3b06..9e9f41dc0f0d 100644 --- a/html/pfappserver/lib/pfappserver/I18N/en.po +++ b/html/pfappserver/lib/pfappserver/I18N/en.po @@ -4256,10 +4256,6 @@ msgstr "" msgid "Should httpd.portal be started? Keep enabled unless you know what you're doing." msgstr "" -# conf/documentation.conf (services.httpd_proxy) -msgid "Should httpd.proxy be started? Keep enabled unless you know what you're doing." -msgstr "" - # conf/documentation.conf (services.httpd_webservices) msgid "Should httpd.webservices be started? Keep enabled unless you know what you're doing." msgstr "" @@ -6736,7 +6732,6 @@ msgstr "" # conf/documentation.conf (services.httpd_collector options) # conf/documentation.conf (services.httpd_dispatcher options) # conf/documentation.conf (services.httpd_portal options) -# conf/documentation.conf (services.httpd_proxy options) # conf/documentation.conf (services.httpd_webservices options) # conf/documentation.conf (services.ip6tables options) # conf/documentation.conf (services.iptables options) @@ -6939,7 +6934,6 @@ msgstr "" # conf/documentation.conf (services.httpd_collector options) # conf/documentation.conf (services.httpd_dispatcher options) # conf/documentation.conf (services.httpd_portal options) -# conf/documentation.conf (services.httpd_proxy options) # conf/documentation.conf (services.httpd_webservices options) # conf/documentation.conf (services.ip6tables options) # conf/documentation.conf (services.iptables options) @@ -8367,10 +8361,6 @@ msgstr "httpd.dispatcher" msgid "services.httpd_portal" msgstr "httpd.portal" -# conf/documentation.conf -msgid "services.httpd_proxy" -msgstr "httpd.proxy" - # conf/documentation.conf msgid "services.httpd_webservices" msgstr "httpd.webservices" diff --git a/html/pfappserver/lib/pfappserver/I18N/fr.po b/html/pfappserver/lib/pfappserver/I18N/fr.po index 60cfeba7985e..62f89ddf5e52 100644 --- a/html/pfappserver/lib/pfappserver/I18N/fr.po +++ b/html/pfappserver/lib/pfappserver/I18N/fr.po @@ -4691,12 +4691,6 @@ msgid "" "doing." msgstr "Est-ce que httpd.portal doit être démarré ? Gardez le activé sauf si vous savez ce que vous faites." -# conf/documentation.conf (services.httpd_proxy) -msgid "" -"Should httpd.proxy be started? Keep enabled unless you know what you're " -"doing." -msgstr "Est-ce que https.proxy doit être démarré ? Gardez le activé sauf si vous savez ce que vous faites." - # conf/documentation.conf (services.httpd_webservices) msgid "" "Should httpd.webservices be started? Keep enabled unless you know what " @@ -7516,7 +7510,6 @@ msgstr "dhcplistener" # conf/documentation.conf (services.httpd_collector options) # conf/documentation.conf (services.httpd_dispatcher options) # conf/documentation.conf (services.httpd_portal options) -# conf/documentation.conf (services.httpd_proxy options) # conf/documentation.conf (services.httpd_webservices options) # conf/documentation.conf (services.ip6tables options) # conf/documentation.conf (services.iptables options) @@ -7740,7 +7733,6 @@ msgstr "en_US" # conf/documentation.conf (services.httpd_collector options) # conf/documentation.conf (services.httpd_dispatcher options) # conf/documentation.conf (services.httpd_portal options) -# conf/documentation.conf (services.httpd_proxy options) # conf/documentation.conf (services.httpd_webservices options) # conf/documentation.conf (services.ip6tables options) # conf/documentation.conf (services.iptables options) @@ -9168,10 +9160,6 @@ msgstr "Répartiteur HTTP" msgid "services.httpd_portal" msgstr "httpd.portal" -# conf/documentation.conf -msgid "services.httpd_proxy" -msgstr "httpd.proxy" - # conf/documentation.conf msgid "services.httpd_webservices" msgstr "httpd.webservices" diff --git a/html/pfappserver/root/src/views/Configuration/services/_components/TheForm.vue b/html/pfappserver/root/src/views/Configuration/services/_components/TheForm.vue index 72d729e0db3f..79460d36c595 100644 --- a/html/pfappserver/root/src/views/Configuration/services/_components/TheForm.vue +++ b/html/pfappserver/root/src/views/Configuration/services/_components/TheForm.vue @@ -60,11 +60,6 @@ :text="$i18n.t(`Should httpd.portal be started? Keep enabled unless you know what you're doing.`)" /> - - 'httpd.apache', 'conditions' => [ '$programname contains "httpd_collector"', - '$programname contains "httpd_proxy"', '$programname == "httpd.aaa-docker-wrapper"', '$programname == "httpd.portal-docker-wrapper"', '$programname == "httpd.webservices-docker-wrapper"', diff --git a/lib/pf/services/manager/httpd_proxy.pm b/lib/pf/services/manager/httpd_proxy.pm deleted file mode 100644 index ecaca101f281..000000000000 --- a/lib/pf/services/manager/httpd_proxy.pm +++ /dev/null @@ -1,74 +0,0 @@ -package pf::services::manager::httpd_proxy; - -=head1 NAME - -pf::services::manager::httpd_proxy add documentation - -=cut - -=head1 DESCRIPTION - -pf::services::manager::httpd_proxy - -=cut - -use strict; -use warnings; -use Moo; -use pf::config qw(%Config @internal_nets); -use pf::util; - -extends 'pf::services::manager::httpd'; - -has '+name' => (default => sub { 'httpd.proxy' } ); - -sub isManaged { - my ($self) = @_; - return isenabled($Config{'fencing'}{'interception_proxy'}) && $self->SUPER::isManaged(); -} - -sub additionalVars { - my ($self) = @_; - my %vars = ( - proxy_ports => [split(/ *, */,$Config{'fencing'}{'interception_proxy_port'})], - ); - return %vars; -} - -sub port { 444 } - -sub vhosts { - return [map { - (defined $_->{Tvip} && $_->{Tvip} ne '') ? $_->{Tvip} : $_->{Tip} - } @internal_nets]; -} - -=head1 AUTHOR - -Inverse inc. - - -=head1 COPYRIGHT - -Copyright (C) 2005-2023 Inverse inc. - -=head1 LICENSE - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -USA. - -=cut - -1; diff --git a/lib/pf/web/proxy_modperl_require.pl b/lib/pf/web/proxy_modperl_require.pl deleted file mode 100644 index d5bcc2e16a99..000000000000 --- a/lib/pf/web/proxy_modperl_require.pl +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/perl - -=head1 NAME - -captiveportal_modperl_require.pl - Pre-loading PacketFence's modules in Apache (mod_perl) for the Captive Portal - -=cut - -use strict; -use warnings; - -BEGIN { - use lib qw(/usr/local/pf/lib /usr/local/pf/lib_perl/lib/perl5); - use pf::log 'service' => 'httpd.proxy', reinit => 1; -} - -use pf::web::interceptproxy; - - -=head1 AUTHOR - -Inverse inc. - -=head1 COPYRIGHT - -Copyright (C) 2005-2023 Inverse inc. - -=head1 LICENSE - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -USA. - -=cut - -1; diff --git a/rpm/packetfence.spec b/rpm/packetfence.spec index fcd8cfe08a8a..e3e6bee52d00 100644 --- a/rpm/packetfence.spec +++ b/rpm/packetfence.spec @@ -386,7 +386,6 @@ done %{__install} -D -m0644 conf/systemd/packetfence-httpd.aaa.service %{buildroot}%{_unitdir}/packetfence-httpd.aaa.service %{__install} -D -m0644 conf/systemd/packetfence-httpd.collector.service %{buildroot}%{_unitdir}/packetfence-httpd.collector.service %{__install} -D -m0644 conf/systemd/packetfence-httpd.portal.service %{buildroot}%{_unitdir}/packetfence-httpd.portal.service -%{__install} -D -m0644 conf/systemd/packetfence-httpd.proxy.service %{buildroot}%{_unitdir}/packetfence-httpd.proxy.service %{__install} -D -m0644 conf/systemd/packetfence-httpd.webservices.service %{buildroot}%{_unitdir}/packetfence-httpd.webservices.service %{__install} -D -m0644 conf/systemd/packetfence-docker-iptables.service %{buildroot}%{_unitdir}/packetfence-docker-iptables.service %{__install} -D -m0644 conf/systemd/packetfence-iptables.service %{buildroot}%{_unitdir}/packetfence-iptables.service @@ -1190,8 +1189,6 @@ fi /usr/local/pf/conf/httpd.conf.d/httpd.aaa.tt.example %config /usr/local/pf/conf/httpd.conf.d/httpd.portal.tt /usr/local/pf/conf/httpd.conf.d/httpd.portal.tt.example -%config /usr/local/pf/conf/httpd.conf.d/httpd.proxy.tt - /usr/local/pf/conf/httpd.conf.d/httpd.proxy.tt.example %config /usr/local/pf/conf/httpd.conf.d/httpd.webservices.tt /usr/local/pf/conf/httpd.conf.d/httpd.webservices.tt.example %config /usr/local/pf/conf/httpd.conf.d/httpd.collector.tt