Original configuration, supposed to work, but it didn't
In /var/aegir/config/server_master/apache/vhost.d/cc-prod.local
<VirtualHost 127.0.0.1:443>
DocumentRoot /var/aegir/platforms/production/drupal-7.27
ServerName cc-prod.local
SetEnv db_type mysql
SetEnv db_name ccprodlocal
SetEnv db_user ccprodlocal
SetEnv db_passwd 12345
SetEnv db_host localhost
SetEnv db_port 3306
# Enable SSL handling.
SSLEngine on
SSLCertificateFile /var/aegir/config/server_master/ssl.d/cc-prod.local/openssl.crt
SSLCertificateKeyFile /var/aegir/config/server_master/ssl.d/cc-prod.local/openssl.key
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^/files/(.*)$ /sites/cc-prod.local/files/$1 [L]
RewriteCond /var/aegir/platforms/production/drupal-7.27/sites/cc-prod.local/files/robots.txt -f
RewriteRule ^/robots.txt /sites/cc-prod.local/files/robots.txt [L]
</IfModule>
# Extra configuration from modules:
# Error handler for Drupal > 4.6.7
<Directory ~ "sites/.*/files">
<Files *>
SetHandler This_is_a_Drupal_security_line_do_not_remove
</Files>
Options None
Options +FollowSymLinks
# If we know how to do it safely, disable the PHP engine entirely.
<IfModule mod_php5.c>
php_flag engine off
</IfModule>
</Directory>
# Prevent direct reading of files in the private dir.
# This is for Drupal7 compatibility, which would normally drop
# a .htaccess in those directories, but we explicitly ignore those
<Directory "/var/aegir/platforms/production/drupal-7.27/sites/cc-prod.local/private/" >
<Files *>
SetHandler This_is_a_Drupal_security_line_do_not_remove
</Files>
Deny from all
Options None
Options +FollowSymLinks
# If we know how to do it safely, disable the PHP engine entirely.
<IfModule mod_php5.c>
php_flag engine off
</IfModule>
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /var/aegir/platforms/production/drupal-7.27
ServerName cc-prod.local
SetEnv db_type mysql
SetEnv db_name ccprodlocal
SetEnv db_user ccprodlocal
SetEnv db_passwd 12345
SetEnv db_host localhost
SetEnv db_port 3306
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^/files/(.*)$ /sites/cc-prod.local/files/$1 [L]
RewriteCond /var/aegir/platforms/production/drupal-7.27/sites/cc-prod.local/files/robots.txt -f
RewriteRule ^/robots.txt /sites/cc-prod.local/files/robots.txt [L]
</IfModule>
# Extra configuration from modules:
# Error handler for Drupal > 4.6.7
<Directory ~ "sites/.*/files">
<Files *>
SetHandler This_is_a_Drupal_security_line_do_not_remove
</Files>
Options None
Options +FollowSymLinks
# If we know how to do it safely, disable the PHP engine entirely.
<IfModule mod_php5.c>
php_flag engine off
</IfModule>
</Directory>
# Prevent direct reading of files in the private dir.
# This is for Drupal7 compatibility, which would normally drop
# a .htaccess in those directories, but we explicitly ignore those
<Directory "/var/aegir/platforms/production/drupal-7.27/sites/cc-prod.local/private/" >
<Files *>
SetHandler This_is_a_Drupal_security_line_do_not_remove
</Files>
Deny from all
Options None
Options +FollowSymLinks
# If we know how to do it safely, disable the PHP engine entirely.
<IfModule mod_php5.c>
php_flag engine off
</IfModule>
</Directory>
</VirtualHost>
I pull the cc-prod.local 443 setting, and put it into /etc/httpd/conf.d/ssl.conf, I have the following
#This is a simple html site and it is working
<VirtualHost 127.0.0.1:443>
ServerName your_ssl.local
DocumentRoot /var/www/html/test/testme/your_ssl
SSLEngine on
SSLCertificateFile /etc/httpd/ssl/apache.crt
SSLCertificateKeyFile /etc/httpd/ssl/apache.key
</VirtualHost>
#Also, in /etc/httpd/conf.d/ssl.conf, I have the following
# This is a drupal site and I got error
# An error occurred during a connection to cc-prod.local. SSL received a record that exceeded the maximum permissible length. (Error code:
# ssl_error_rx_record_too_long)
<VirtualHost 127.0.0.1:443>
DocumentRoot /var/aegir/platforms/production/drupal-7.27
ServerName cc-prod.local
SetEnv db_type mysql
SetEnv db_name ccprodlocal
SetEnv db_user ccprodlocal
SetEnv db_passwd 12345
SetEnv db_host localhost
SetEnv db_port 3306
# Enable SSL handling.
SSLEngine on
SSLCertificateFile /var/aegir/config/server_master/ssl.d/cc-prod.local/openssl.crt
SSLCertificateKeyFile /var/aegir/config/server_master/ssl.d/cc-prod.local/openssl.key
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^/files/(.*)$ /sites/cc-prod.local/files/$1 [L]
RewriteCond /var/aegir/platforms/production/drupal-7.27/sites/cc-prod.local/files/robots.txt -f
RewriteRule ^/robots.txt /sites/cc-prod.local/files/robots.txt [L]
</IfModule>
# Extra configuration from modules:
# Error handler for Drupal > 4.6.7
<Directory ~ "sites/.*/files">
<Files *>
SetHandler This_is_a_Drupal_security_line_do_not_remove
</Files>
Options None
Options +FollowSymLinks
# If we know how to do it safely, disable the PHP engine entirely.
<IfModule mod_php5.c>
php_flag engine off
</IfModule>
</Directory>
# Prevent direct reading of files in the private dir.
# This is for Drupal7 compatibility, which would normally drop
# a .htaccess in those directories, but we explicitly ignore those
<Directory "/var/aegir/platforms/production/drupal-7.27/sites/cc-prod.local/private/" >
<Files *>
SetHandler This_is_a_Drupal_security_line_do_not_remove
</Files>
Deny from all
Options None
Options +FollowSymLinks
# If we know how to do it safely, disable the PHP engine entirely.
<IfModule mod_php5.c>
php_flag engine off
</IfModule>
</Directory>
</VirtualHost>
The error I got after moving cc-prod.local 443 setting to /etc/httpd/conf.d/ssl.conf
Access https://cc-prod.local, gets error
"An error occurred during a connection to cc-prod.local. SSL received a record that exceeded the maximum permissible length. (Error code: ssl_error_rx_record_too_long)"
How do I fix it?