]> SAFE projects GIT repository - jmp/mailleur/commitdiff
IMproving do_httpd.sh
authorJean-Marc Pigeon (Delson) <jmp@safe.ca>
Mon, 25 Aug 2025 11:58:56 +0000 (07:58 -0400)
committerJean-Marc Pigeon (Delson) <jmp@safe.ca>
Mon, 25 Aug 2025 11:58:56 +0000 (07:58 -0400)
support/do_httpd.sh
support/starting.sh

index 385748312cd84e09711a41d4d8e858ca800bddcb..5660f28d2d5ab170e889c9e95d62a3ed31cb4ae9 100755 (executable)
@@ -39,9 +39,9 @@ cat >> /etc/httpd/conf.d/$APPNAME.conf <<!EOT
        ServerAlias             localhost.localdomain
         ServerAdmin            root@$domain
        RewriteEngine           on
-       #comment it in if you want to debug redirect
+       #comment in if you want to debug redirect
        #LogLevel                alert rewrite:trace3
-        RewriteCond            %{HTTP_HOST} ^clement\.$reldom          [OR]
+        RewriteCond            %{HTTP_HOST} ^$APPNAME\.$reldom         [OR]
        RewriteCond             %{HTTP_HOST} ^`hostname -s`\.$reldom
         RewriteRule            ^(.*)$ https://`hostname -s`.$domain    [R=301]
         ErrorLog               logs/clemerr.log
@@ -57,13 +57,13 @@ Listen  443
         ServerAlias            $APPNAME.$domain
         ServerAlias            localhost.localdomain
         ServerAdmin            root@$domain
-        DocumentRoot           $BASE/var/www/$APPNAME
-       setenv PATH_INFO        $BASE/etc/$APPNAME/$APPNAME.php
-        Alias /base-dir/       $BASE/var/www/$APPNAME/ 
-        Alias /reg-icons/      $BASE/var/www/$APPNAME/reg-icons/
-        Alias /base-graph/     $BASE/var/www/$APPNAME/graph/
-       ScriptAlias /cgi-bin/   $BASE/var/www/$APPNAME/
-        <Directory             $BASE/var/www/$APPNAME>
+        DocumentRoot           /var/www/$APPNAME
+       setenv PATH_INFO        /etc/$APPNAME/$APPNAME.php
+        Alias /base-dir/       /var/www/$APPNAME/ 
+        Alias /reg-icons/      /var/www/$APPNAME/reg-icons/
+        Alias /base-graph/     /var/www/$APPNAME/graph/
+       ScriptAlias /cgi-bin/   /var/www/$APPNAME/
+        <Directory             /var/www/$APPNAME>
                 Options MultiViews FollowSymlinks ExecCGI
                 AllowOverride AuthConfig FileInfo Indexes Limit Options
                Require all granted
@@ -71,8 +71,8 @@ Listen  443
        #----------------------------------------------
        #SSL
        SSLEngine On
-       SSLCertificateKeyFile   /etc/pki/$APPNAME/$APPNME-key.pem
-       SSLCertificateFile      /etc/pki/$APPNAME/$APPNME-cert.pem
+       SSLCertificateKeyFile   /etc/$APPNAME/pki/$APPNAME-key.pem
+       SSLCertificateFile      /etc/$APPNAME/pki/$APPNAME-cert.pem
        SSLProtocol             +TLSv1.3 +TLSv1.2
        SSLCompression          OFF
         SSLHonorCipherOrder    ON
@@ -106,4 +106,6 @@ if [ -n "$hostipv6" ] ; then
   add_web $hostipv6
   fi
 
+#restarting httpd server
+service httpd restart
 
index c6b4ba3b695aeca1080bd8939faf434b898c2c41..387a455aed2eae63e1e872a7f17e7f5dd0bb47c1 100755 (executable)
@@ -158,6 +158,11 @@ do_webconf()
 
 {
 /usr/lib/$APPNAME/support/do_httpd.sh
+if [ $? = 0 ] ; then
+  sh_success $"Preparing $APPNAME httpd configuration"
+else
+  sh_failure $"Preparing $APPNAME httpd configuration"
+fi 
 }
 #----------------------------------------------------------------------
 #procedure to check if the config is properly done