Bozhidar Slaveykov 1 year ago
parent
commit
80a2db7605

+ 9 - 0
web/app/Actions/ApacheWebsiteApplySSLVirtualHost.php

@@ -60,7 +60,16 @@ class ApacheWebsiteApplySSLVirtualHost
         ];
         $apache2SSLSample = view('actions.samples.ubuntu.apache2-ssl-conf',$settings)->render();
 
+        $apache2SSLOptionsSample = view('actions.samples.ubuntu.apache2-ssl-options-conf')->render();
+
+
         $fileManagerApi = new FileManagerApi();
+
+        $apache2SSLOptionsFilePath = '/etc/apache2/phyre/options-ssl-apache.conf';
+        if (!$fileManagerApi->isFileExists($apache2SSLOptionsFilePath)) {
+            $fileManagerApi->filePutContents($apache2SSLOptionsFilePath, $apache2SSLOptionsSample);
+        }
+
         $fileManagerApi->filePutContents('/etc/apache2/sites-available/'.$this->domain.'-ssl.conf', $apache2SSLSample);
         $fileManagerApi->symlink('/etc/apache2/sites-available/'.$this->domain.'-ssl.conf', '/etc/apache2/sites-enabled/'.$this->domain.'-ssl.conf');
 

+ 19 - 0
web/resources/views/actions/samples/ubuntu/apache2-ssl-options-conf.blade.php

@@ -0,0 +1,19 @@
+# This file contains important security parameters. If you modify this file
+# manually, Certbot will be unable to automatically provide future security
+# updates. Instead, Certbot will print and log an error message with a path to
+# the up-to-date file that you will need to refer to when manually updating
+# this file.
+
+SSLEngine on
+
+# Intermediate configuration, tweak to your needs
+SSLProtocol             all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
+SSLCipherSuite          ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
+SSLHonorCipherOrder     off
+SSLSessionTickets       off
+
+SSLOptions +StrictRequire
+
+# Add vhost name to log entries:
+LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" vhost_combined
+LogFormat "%v %h %l %u %t \"%r\" %>s %b" vhost_common