[SOLVED] Icons doesn't show in Activities - Nextcloud snap with Apache reverse proxy

I had problem which I solved by editing guide from this GitHub theme - Icons are not loading in ‘Activity’ tab. Caused by ‘Content Security Policy’

My config files of Apache reverse proxy:
/etc/apache2/sites-available/drive.example.com.conf
<VirtualHost *:80>
ServerName drive.example.com
Redirect permanent / https://drive.example.com/
</VirtualHost>

/etc/apache2/sites-available/drive.example.com-le-ssl.conf
<VirtualHost *:443>
ServerName drive.example.com
ErrorLog ${APACHE_LOG_DIR}/nextcloud-error.log
CustomLog ${APACHE_LOG_DIR}/nextcloud-access.log combined
SSLEngine On
ProxyPreserveHost On
ProxyPass / http://0.0.0.0:81/
ProxyPassReverse / http://0.0.0.0:81/
Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
RewriteEngine On
RewriteRule ^/\.well-known/carddav https://%{SERVER_NAME}/remote.php/dav/ [R=301,L]
RewriteRule ^/\.well-known/caldav https://%{SERVER_NAME}/remote.php/dav/ [R=301,L]
SSLCertificateFile /etc/letsencrypt/live/drive.example.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/drive.example.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
I was finding example files for Apache for a while and I would be glad for working example like here :slight_smile:

The working solution for snap instance of Nextcloud is command in terminal:
$ sudo nextcloud.occ config:system:set overwriteprotocol --value="https"
which repair mixed content error.

1 Like