воскресенье, 6 января 2019 г.

Virtual Host for OwnCloud SSL LetsEncrypt (Dehydrated, Apache)



/etc/httpd/conf.d/owncloud.conf

<VirtualHost *:80>
    ServerName DOMAIN.COM
        DocumentRoot /var/www/html/owncloud

        <Directory /var/www/html/owncloud>
                AddDefaultCharset UTF8
                AllowOverride All
                Order allow,deny
                Allow from all
        </Directory>

        ErrorLog /var/log/disk-error.log
        CustomLog /var/log/disk-requests.log combined

        Alias /.well-known/acme-challenge/ /var/www/html/le/.well-known/acme-challenge/



        <Directory "/var/www/html/le/.well-known/acme-challenge/">
                Options None
                AllowOverride None
                ForceType text/plain
                RedirectMatch 404 "^(?!/\.well-known/acme-challenge/[\w-]{43}$)"
        </Directory>

</VirtualHost>

<VirtualHost *:443>
        ServerName disk.kuchuk.net
        ServerAlias d.kuchuk.net

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

        SSLProxyEngine On
        ProxyRequests Off
        ProxyPreserveHost On
        ProxyVia full

        SSLEngine On
        SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire

        SSLCertificateFile /etc/dehydrated/certs/DOMAIN.COM/fullchain.pem
        SSLCertificateKeyFile /etc/dehydrated/certs/DOMAIN.COM/privkey.pem

        SSLProxyVerify none
        SSLProxyCheckPeerCN off
        SSLProxyCheckPeerName off
        SSLProxyCheckPeerExpire off

        DocumentRoot /var/www/html/owncloud
        <Directory /var/www/html/owncloud>
                AddDefaultCharset UTF8
                AllowOverride All
                Order allow,deny
                Allow from all
        </Directory>

        ErrorLog /var/log/disk-error.log
        CustomLog /var/log/disk-requests.log combined
</VirtualHost>


https://sysadmin.pm/dehydrated-letsencrypt/

Комментариев нет:

Отправить комментарий