How to owncloud 9 install ssl certificate centos 7

How to owncloud 9 install ssl certificate centos 7

How to owncloud 9 install ssl certificate centos 7. in the previous, how to install owncloud 9 in centos 7


To install  mod SSL

#yum install mod_ssl

To create new certificate


#mkdir /etc/httpd/ssl
#openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/httpd/ssl/owncloud.key -out /etc/httpd/ssl/owncloud.pem

Adjusting /etc/httpd/conf.d/owncloud.conf file


<VirtualHost *:80>
    DocumentRoot /var/www/html/owncloud/
    Redirect permanent / https://172.16.235.145/
    <Directory /var/www/html/owncloud>
        Options FollowSymLinks MultiViews
        AllowOverride ALL
        Order allow,deny
        allow from all
    </Directory>
</VirtualHost>
<VirtualHost *:443>
    SSLEngine on    SSLCertificateFile /etc/httpd/ssl/owncloud.pem    SSLCertificateKeyFile /etc/httpd/ssl/owncloud.key
    DocumentRoot /var/www/html/owncloud/
    <Directory /var/www/html/owncloud>
        Options FollowSymLinks MultiViews
        AllowOverride ALL
        Order allow,deny
        allow from all
    </Directory>
 <IfModule mod_headers.c>      Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains; preload"    </IfModule>
</VirtualHost>

Solve problem in install owncloud 9


Security & setup warnings
Your data directory and your files are probably accessible from the Internet. The .htaccess file is not working. We strongly suggest that you configure your web server in a way that the data directory is no longer accessible or you move the data directory outside the web server document root.

The "Strict-Transport-Security" HTTP header is not configured to at least "15552000" seconds. For enhanced security we recommend enabling HSTS as described in our security tips.

To solve add lines bellow in file /etc/httpd/conf.d/owncloud.conf

 <IfModule mod_headers.c>
      Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains; preload"
    </IfModule>

Comments

Popular posts from this blog

zimbra some services are not running [Solve problem]

Bash script list all IP addresses connected to Server

How to install php7 on centos 6