āļ§āļīāļ˜āļĩāļāļēāļĢāļ•āļīāļ”āļ•āļąāđ‰āļ‡ SSL Certificate āļŠāļģāļŦāļĢāļąāļšÂ NextCloud 

1. āļ—āļģāļāļēāļĢāļ•āļīāļ”āļ•āļąāđ‰āļ‡ mod_ssl

  • CentOS āļŠāļąāđˆāļ‡Â yum -y install mod_ssl
  • Ubuntu āļŠāļąāđˆāļ‡Â sudo a2enmod ssl && sudo a2enmod vhost_alias
     
  • āļ•āļĢāļ§āļˆāļŠāļ­āļšāļ„āļ§āļēāļĄāļ–āļđāļāļ•āđ‰āļ­āļ‡

    httpd -M | grep ssl

2. āļ—āļģāļāļēāļĢāļ­āļąāļžāđ‚āļŦāļĨāļ”āđ„āļŸāļĨāđŒ SSL Certificate āđ„āļ›āļĒāļąāļ‡āđ€āļ‹āļīāļĢāđŒāļŸāđ€āļ§āļ­āļĢāđŒ

  • mkdir -p /etc/httpd/conf/ssl
  • āļ­āļąāļžāđ‚āļŦāļĨāļ”āđ„āļŸāļĨāđŒ SSL āđ„āļ›āļĒāļąāļ‡āđ‚āļŸāļĨāđ€āļ”āļ­āļĢāđŒÂ Â /etc/httpd/conf/ssl
    āđ„āļ”āđ‰āđāļāđˆÂ domain_name.crt , private.key , CARootCertificate-ca.crt

3. āļ—āļģāļāļēāļĢāđāļāđ‰āđ„āļ‚āđ„āļŸāļĨāđŒ config httpd / ssl.conf 

āļ–āđ‰āļēāļ•āđ‰āļ­āļ‡āļāļēāļĢ Bind SSL āļ—āļļāļ Hostname āđāļāđ‰āļ”āļąāļ‡āļ™āļĩāđ‰

  • vi /etc/httpd/conf.d/ssl.conf
#SSLCertificateFile /etc/pki/tls/certs/localhost.crt << comment āļ”āđ‰āļ§āļĒ # āļ”āđ‰āļēāļ™āļŦāļ™āđ‰āļē
SSLCertificateFile /etc/httpd/conf/ssl/domain_com.crt

#SSLCertificateKeyFile /etc/pki/tls/private/localhost.key << comment āļ”āđ‰āļ§āļĒ # āļ”āđ‰āļēāļ™āļŦāļ™āđ‰āļē
SSLCertificateKeyFile /etc/httpd/conf/ssl/private.key


#SSLCACertificateFile /etc/pki/tls/certs/ca-bundle.crt << comment āļ”āđ‰āļ§āļĒ # āļ”āđ‰āļēāļ™āļŦāļ™āđ‰āļē
SSLCACertificateFile /etc/httpd/conf/ssl/CARootCertificate-ca.crt

āļ–āđ‰āļēāļ•āđ‰āļ­āļ‡āļāļēāļĢ SSL āđ€āļ‰āļžāļēāļ° Hostname āļ—āļĩāđˆāļ•āđ‰āļ­āļ‡āļāļēāļĢ āđāļāđ‰āđ„āļ‚āļ”āļąāļ‡āļ™āļĩāđ‰

  • vi /etc/httpd/conf.d/nextcloud.conf
<VirtualHost *:80>
    ServerName your-domain.com
    ServerAlias  www.your-domain.com
    Redirect / https://your-domain.com
</VirtualHost>


<VirtualHost *:443>
  ServerName your-domain.com
  ServerAlias  www.your-domain.com

  #ErrorLog ${APACHE_LOG_DIR}/error.log
  #CustomLog ${APACHE_LOG_DIR}/access.log combined

  DocumentRoot /var/www/html/nextcloud
  <directory /var/www/html/nextcloud>
    Require all granted
    AllowOverride All
    Options FollowSymLinks MultiViews
    SetEnv HOME /var/www/html/nextcloud
    SetEnv HTTP_HOME /var/www/html/nextcloud
  </directory>

  SSLEngine on
  SSLCertificateFile /etc/httpd/ssl/domain/domain.crt
  SSLCertificateKeyFile /etc/httpd/ssl/domain/private.key
  SSLCACertificateFile /etc/httpd/ssl/domain/CARootCertificate-ca.crt
</VirtualHost>

4. āļ•āļĢāļ§āļˆāļŠāļ­āļšāļ„āļ§āļēāļĄāļ–āļđāļāļ•āđ‰āļ­āļ‡Â 

  • httpd -t
  • httpd -S
     
  • āļ—āļģāļāļēāļĢ restart httpd service
    service httpd restart

5. āļ—āļģāļāļēāļĢ Allow Firewall Port 443

  • ufw allow https
  • iptables -I INPUT -p tcp -m tcp --dport 443 -j ACCEPT

6. āļ—āļ”āļŠāļ­āļšāđƒāļŠāđ‰āļ‡āļēāļ™

  • https://your-domain.com/nextcloud
  • openssl s_client -connect 127.0.0.1:443

 

āļāļēāļĢāļ•āļīāļ”āļ•āļąāđ‰āļ‡āļĢāļ°āļšāļšāļ­āļ·āđˆāļ™
https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-nextcloud-on-ubuntu-18-04

 

------------------------------------------------------------

āļāļĢāļ“āļĩāļ•āđ‰āļ­āļ‡āļāļēāļĢāđƒāļŠāđ‰ nextcloud command 

  • yum install php-posix -y
  • cd /var/www/nextcloud
  • sudo -u apache php occ
     
  • āļ•āļĢāļ§āļˆāļŠāļ­āļš command āļ­āļ·āđˆāļ™āđ† āļŠāļąāđˆāļ‡
    which occ
     
  • NextCloud-Snap āļŠāļēāļĄāļēāļĢāļ–āļ•āļīāļ”āļ•āļąāđ‰āļ‡ SSL āđ‚āļ”āļĒāļ„āļģāļŠāļąāđˆāļ‡
    https://github.com/nextcloud-snap/nextcloud-snap#included-cli-utilities
     
    nextcloud.enable-https  custom domain_com.crt private.key CARootCertificate-ca.crt

     

--------------------------------------------------------------

https://help.nextcloud.com/t/import-paid-ssl-certificate-on-nexcloud/96796/3

https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html?highlight=apache#ssl

 

āđ„āļ­āđ€āļĢāļĩāļĒāļĨāļĨāļĩāđˆāđ‚āļŪāļŠ
āļŠāļģāļŦāļĢāļąāļšāļāļēāļĢāļŠāļ™āļąāļšāļŠāļ™āļļāļ™ āđāļĨāļ°āļŠāđˆāļ§āļĒāđ€āļŦāļĨāļ·āļ­
http://www.ireallyhost.com/support
āļ‚āđ‰āļ­āļāļģāļŦāļ™āļ”āđƒāļ™āļāļēāļĢāđ€āļœāļĒāđāļžāļĢāđˆāļšāļ—āļ„āļ§āļēāļĄ āļ‚āđˆāļēāļ§āļŠāļēāļĢ
** āļšāļ—āļ„āļ§āļēāļĄāļ™āļĩāđ‰āļĄāļĩāļĨāļīāļ‚āļŠāļīāļ—āļ˜āļīāđŒ āđ„āļĄāđˆāļ­āļ™āļļāļāļēāļ•āļīāđƒāļŦāđ‰āļ„āļąāļ”āļĨāļ­āļ āļ—āļģāļ‹āđ‰āļģ āļ”āļąāļ”āđāļ›āļĨāļ‡āļāđˆāļ­āļ™āđ„āļ”āđ‰āļĢāļąāļšāļ­āļ™āļļāļāļēāļ• **
āđ‚āļ›āļĢāļ”āļĢāļ°āļšāļļāđāļŦāļĨāđˆāļ‡āļ—āļĩāđˆāļĄāļē āļšāļĢāļīāļĐāļąāļ— āđ€āļ­āđ‡āļāļ‹āđŒāļ•āļĢāđ‰āļē āļ„āļ­āļĢāđŒāļ›āļ­āđ€āļĢāļŠāļąāđˆāļ™ āļˆāļģāļāļąāļ” / https://www.ireallyhost.com
āļ—āļąāđˆāļ§āđ„āļ›
āļ„āļđāđˆāļĄāļ·āļ­ / āļ§āļīāļ˜āļĩāļāļēāļĢāļ•āļīāļ”āļ•āļąāđ‰āļ‡ SSL Certificate āļŠāļģāļŦāļĢāļąāļš cPanel Web Control Panel
āļšāļĢāļīāļāļēāļĢ SSL Certificate - āđ‚āļ”āļĒāđ„āļ­āđ€āļĢāļĩāļĒāļĨāļĨāļĩāđˆāđ‚āļŪāļŠ