Requirements
Steps
Alias /nextcloud /usr/local/www/nextcloud AcceptPathInfo On<Directory /usr/local/www/nextcloud> AllowOverride All Require all granted </Directory>#Uncomment LoadModule socache_shmcb_module modules/mod_socache_shmcb.so LoadModule ssl_module libexec/apache24/mod_ssl.soServerName nc.my_domain.org:443 ServerAdmin webmaster@my_domain.org#Uncomment Include etc/apache24/extra/httpd-ssl.conf |
<FilesMatch "\.php$"> SetHandler application/x-httpd-php </FilesMatch> <FilesMatch "\.phps$"> SetHandler application/x-httpd-php-source </FilesMatch> |
# cd /usr/local/etc/apache24 # openssl genrsa -des3 -out server.key 2048 # openssl req -new -key server.key -out server.csr # ----- Self signed cert # openssl x509 -req -days 3650 -in server.csr -signkey server.key -out server.crt # ----- Self signed cert ### Get a free 6 month trial SSL Cert from https://ssl.comodo.com/free-ssl-certificate.php ###Get a free 6 month trial SSL Cert from # chmod 0400 /usr/local/etc/apache24/server.key # chmod 0400 /usr/local/etc/apache24/server.crt # cd /usr/local/etc/apache24 # cp server.key server.key.orig # openssl rsa -in server.key.orig -out server.key |
<VirtualHost _default_:443> Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" |