Nextcloud con immagine Docker: Difference between revisions

From RVM Wiki
Jump to navigation Jump to search
Created page with "{{Stub}} =Reverse Proxy Apache= <pre> <VirtualHost *:80> ServerName cloud.domain.com ServerAlias cloud.domain.com LogFormat "%v - %h %l %u %t \"%r\" %>s %b \..."
 
mNo edit summary
 
Line 1: Line 1:
{{Stub}}
{{Stub}}


Se si usa Nginx Proxy Manager come reverse proxy, bisogna attivare il redirect per caldav/carddav, aggiungendo nella tab advanced:<pre>
location /.well-known/carddav {
    return 301 $scheme://$host/remote.php/dav;
}
location /.well-known/caldav {
    return 301 $scheme://$host/remote.php/dav;
}
</pre>


=Reverse Proxy Apache=
=Reverse Proxy Apache=

Latest revision as of 18:19, 19 July 2024

Attenzione questo articolo è ancora incompleto.
Sentiti libero di contribuire cliccando sul tasto edit.

Se si usa Nginx Proxy Manager come reverse proxy, bisogna attivare il redirect per caldav/carddav, aggiungendo nella tab advanced:

location /.well-known/carddav {
    return 301 $scheme://$host/remote.php/dav;
}

location /.well-known/caldav {
    return 301 $scheme://$host/remote.php/dav;
}

Reverse Proxy Apache

<VirtualHost *:80>
     ServerName cloud.domain.com
     ServerAlias cloud.domain.com
     LogFormat "%v - %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" comonvhost
     CustomLog /var/log/httpd/access_log comonvhost

     RewriteEngine On
     RewriteCond %{HTTPS} off
     RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

    RewriteCond %{SERVER_NAME} =cloud.domain.com
    RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

<IfModule mod_ssl.c>
<VirtualHost *:443>
    ServerName cloud.domain.com
    ServerAlias cloud.domain.com
    LogFormat "%v - %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" comonvhost
    CustomLog /var/log/httpd/access_log comonvhost

    # Reverse proxy
    RewriteEngine On
    ProxyPreserveHost On

    RewriteCond %{HTTP:Upgrade} websocket [NC]
    RewriteCond %{HTTP:Connection} upgrade [NC]
    RewriteRule .* "ws://localhost:11000/$1" [P,L]
    ProxyRequests off

    ProxyPass / http://localhost:11000/
    ProxyPassReverse / http://localhost:11000/

    # Enable h2, h2c and http1.1 for https
    Protocols h2 h2c http/1.1

    # SSL (Not nessarry if not runinng backend in ssl)
    SSLProxyEngine On
    SSLProxyVerify none
    SSLProxyCheckPeerCN off
    SSLProxyCheckPeerName off
    SSLProxyCheckPeerExpire off

    Header set X-Frame-Options "SAMEORIGIN"
    Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"
    <Files ".ht*">
        Require all denied
    </Files>

    # Disable HTTP TRACE method.
    TraceEnable off

Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/cloud.domain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/cloud.domain.com/privkey.pem
</VirtualHost>
</IfModule>

Riferimenti