diff -urN smeserver-phpki-ng-0.3.old/createlinks smeserver-phpki-ng-0.3/createlinks --- smeserver-phpki-ng-0.3.old/createlinks 2013-11-11 17:05:11.000000000 +0000 +++ smeserver-phpki-ng-0.3/createlinks 2021-02-11 09:29:42.620507032 +0000 @@ -4,13 +4,13 @@ # Start and stop links -service_link_enhanced("httpd-pki", "S86", "7"); -service_link_enhanced("httpd-pki", "K15", "6"); -service_link_enhanced("httpd-pki", "K15", "0"); -service_link_enhanced("httpd-pki", "K15", "1"); +#service_link_enhanced("httpd-pki", "S86", "7"); +#service_link_enhanced("httpd-pki", "K15", "6"); +#service_link_enhanced("httpd-pki", "K15", "0"); +#service_link_enhanced("httpd-pki", "K15", "1"); -safe_symlink("../daemontools" , 'root/etc/rc.d/init.d/supervise/httpd-pki'); -safe_symlink("/var/service/httpd-pki" , 'root/service/httpd-pki'); +#safe_symlink("../daemontools" , 'root/etc/rc.d/init.d/supervise/httpd-pki'); +#safe_symlink("/var/service/httpd-pki" , 'root/service/httpd-pki'); # Panel links @@ -27,3 +27,28 @@ safe_touch("root/etc/e-smith/events/logrotate/logfiles2timestamp/var/log/httpd/pki_error_log"); safe_touch("root/var/service/httpd-pki/down"); +# our event specific for updating with yum without reboot +$event = "smeserver-phpki-ng-update"; +#add here the path to your templates needed to expand +#see the /etc/systemd/system-preset/49-koozali.preset should be present for systemd integration on all you yum update event + +foreach my $file (qw( + /etc/systemd/system-preset/49-koozali.preset + /etc/httpd/conf/httpd.conf + /etc/httpd/pki-conf/httpd.conf + +)) +{ + templates2events( $file, $event ); +} + +#action needed in case we have a systemd unit +event_link("systemd-default", $event, "10"); +event_link("systemd-reload", $event, "50"); + +#action specific to this package +#event_link("conf-timezone", $event, "30"); +#services we need to restart +safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/httpd-pki"); +safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith"); + diff -urN smeserver-phpki-ng-0.3.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/28phpkiProxyPass smeserver-phpki-ng-0.3/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/28phpkiProxyPass --- smeserver-phpki-ng-0.3.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/28phpkiProxyPass 2008-11-27 03:57:13.000000000 +0000 +++ smeserver-phpki-ng-0.3/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/28phpkiProxyPass 2021-02-13 09:55:10.685514336 +0000 @@ -1,6 +1,7 @@ { # vim: ft=perl: + $haveSSL = (exists ${modSSL}{status} and ${modSSL}{status} eq "enabled") ? 'yes' : 'no'; $OUT = ''; @@ -16,6 +17,14 @@ $OUT .=<<"HERE"; + #LoadModule proxy_ajp_module modules/mod_proxy_ajp.so + #LoadModule proxy_connect_module modules/mod_proxy_connect.so + #LoadModule proxy_express_module modules/mod_proxy_express.so + #LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so + #LoadModule proxy_ftp_module modules/mod_proxy_ftp.so + #LoadModule proxy_scgi_module modules/mod_proxy_scgi.so + #LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so + SSLRequireSSL on order deny,allow diff -urN smeserver-phpki-ng-0.3.old/root/etc/e-smith/templates/etc/httpd/pki-conf/httpd.conf/20Modules smeserver-phpki-ng-0.3/root/etc/e-smith/templates/etc/httpd/pki-conf/httpd.conf/20Modules --- smeserver-phpki-ng-0.3.old/root/etc/e-smith/templates/etc/httpd/pki-conf/httpd.conf/20Modules 2020-12-24 07:30:34.731241382 +0000 +++ smeserver-phpki-ng-0.3/root/etc/e-smith/templates/etc/httpd/pki-conf/httpd.conf/20Modules 2021-02-13 11:00:46.430734768 +0000 @@ -10,8 +10,10 @@ ServerRoot /etc/httpd ServerTokens ProductOnly -User phpki -Group phpki +User www +Group www +#User phpki +#Group phpki ErrorLog /var/log/httpd/pki_error_log LogLevel warn @@ -28,7 +30,7 @@ autoindex dir asis - imap +# imap imagemap actions userdir @@ -36,9 +38,9 @@ proxy_http alias rewrite - access - authz_host - authz_user +# access +# authz_host +# authz_user auth auth_anon auth_digest @@ -53,6 +55,14 @@ access_compat authn_core authz_core + proxy_ajp + proxy_connect + proxy_express + proxy_fcgi + proxy_ftp + proxy_html + proxy_scgi + proxy_wstunnel )) { next unless -f "/usr/lib/httpd/modules/mod_${_}.so" || diff -urN smeserver-phpki-ng-0.3.old/root/etc/e-smith/templates/etc/httpd/pki-conf/httpd.conf/90phpki smeserver-phpki-ng-0.3/root/etc/e-smith/templates/etc/httpd/pki-conf/httpd.conf/90phpki --- smeserver-phpki-ng-0.3.old/root/etc/e-smith/templates/etc/httpd/pki-conf/httpd.conf/90phpki 2020-04-03 11:00:40.000000000 +0100 +++ smeserver-phpki-ng-0.3/root/etc/e-smith/templates/etc/httpd/pki-conf/httpd.conf/90phpki 2021-02-09 12:33:57.076075986 +0000 @@ -5,6 +5,9 @@ AddType application/x-httpd-php .php Options FollowSymLinks + + SetHandler "proxy:unix:/var/run/php-fpm/php73.sock|fcgi://localhost" + php_flag register_globals off php_flag register_long_arrays on php_admin_value session.save_path /var/lib/php/pki-session diff -urN smeserver-phpki-ng-0.3.old/root/etc/httpd/pki-conf/httpd.conf smeserver-phpki-ng-0.3/root/etc/httpd/pki-conf/httpd.conf --- smeserver-phpki-ng-0.3.old/root/etc/httpd/pki-conf/httpd.conf 2020-12-24 07:30:34.731241382 +0000 +++ smeserver-phpki-ng-0.3/root/etc/httpd/pki-conf/httpd.conf 2021-02-09 12:32:41.696410122 +0000 @@ -14,7 +14,7 @@ TKTAuthSecret "1234" -Listen 127.0.0.1:950 +Listen 127.0.0.1:940 HostnameLookups off @@ -37,16 +37,16 @@ LoadModule autoindex_module modules/mod_autoindex.so LoadModule dir_module modules/mod_dir.so LoadModule asis_module modules/mod_asis.so -LoadModule imap_module modules/mod_imap.so +#LoadModule imap_module modules/mod_imap.so LoadModule actions_module modules/mod_actions.so LoadModule userdir_module modules/mod_userdir.so LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_http_module modules/mod_proxy_http.so LoadModule alias_module modules/mod_alias.so LoadModule rewrite_module modules/mod_rewrite.so -LoadModule access_module modules/mod_access.so -LoadModule auth_module modules/mod_auth.so -LoadModule auth_anon_module modules/mod_auth_anon.so +#LoadModule access_module modules/mod_access.so +#LoadModule auth_module modules/mod_auth.so +#LoadModule auth_anon_module modules/mod_auth_anon.so LoadModule auth_digest_module modules/mod_auth_digest.so LoadModule expires_module modules/mod_expires.so LoadModule headers_module modules/mod_headers.so diff -urN smeserver-phpki-ng-0.3.old/root/usr/lib/systemd/system/httpd-pki.service smeserver-phpki-ng-0.3/root/usr/lib/systemd/system/httpd-pki.service --- smeserver-phpki-ng-0.3.old/root/usr/lib/systemd/system/httpd-pki.service 1970-01-01 01:00:00.000000000 +0100 +++ smeserver-phpki-ng-0.3/root/usr/lib/systemd/system/httpd-pki.service 2021-02-09 13:02:20.993846308 +0000 @@ -0,0 +1,9 @@ +[Unit] +Description=Certificate management +After=network.service +[Service] +Type=forking +ExecStart=/usr/sbin/systemd/httpd-pki +[Install] +WantedBy=sme-server.target + diff -urN smeserver-phpki-ng-0.3.old/root/usr/sbin/systemd/httpd-pki smeserver-phpki-ng-0.3/root/usr/sbin/systemd/httpd-pki --- smeserver-phpki-ng-0.3.old/root/usr/sbin/systemd/httpd-pki 1970-01-01 01:00:00.000000000 +0100 +++ smeserver-phpki-ng-0.3/root/usr/sbin/systemd/httpd-pki 2021-02-11 10:35:37.924049469 +0000 @@ -0,0 +1,12 @@ +#!/bin/sh +#---------------------------------------------------------------------- +# copyright (C) 1999-2004 Mitel Networks Corporation +#---------------------------------------------------------------------- + +config=/etc/httpd/pki-conf/httpd.conf + +[ -e $config ] || exit 1 + +exec 2>&1 +exec chpst -P /usr/sbin/httpd -f $config -D FOREGROUND & +