Below is my reverse proxy apache config file
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName nextcloud.mydomain.com
ProxyRequests Off
ProxyPreserveHost On
AllowEncodedSlashes NoDecode
SSLProxyEngine On
SSLProxyCheckPeerCN on
SSLProxyCheckPeerExpire on
<Proxy http://localhost:8015/*>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://localhost:8015/ nocanon
ProxyPassReverse / http://localhost:8015/
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/nextcloud.mydomain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/nextcloud.mydomain.com/privkey.pem
</Virtualhost>
</IfModule>
I have Nextcloud/DB running within Docker containers. Here is my docker-compose.yml file:
$ cat docker-compose.yml
version: '2'
volumes:
nextcloud:
db:
services:
db:
image: mariadb:10.2.33
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
restart: always
volumes:
- db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=rootpwd
- MYSQL_PASSWORD=nextcloud
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
app:
image: nextcloud
ports:
- 8015:80
links:
- db
volumes:
- nextcloud:/var/www/html
restart: always
environment:
- OVERWRITEHOST=nextcloud.mydomain.com
- OVERWRITEPROTOCOL=https
$ docker-compose up -d
Creating volume "nextcloud_nextcloud" with default driver
Creating volume "nextcloud_db" with default driver
Creating nextcloud_db_1 ... done
Creating nextcloud_app_1 ... done
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b208a2e4b391 nextcloud "/entrypoint.sh ap..." 21 seconds ago Up 19 seconds 0.0.0.0:8015->80/tcp nextcloud_app_1
dfb1b4159212 mariadb:10.2.33 "docker-entrypoint..." 24 seconds ago Up 21 seconds 3306/tcp nextcloud_db_1
...
5673728a784d collabora/code "/bin/sh -c 'bash ..." 3 months ago Up 3 months 127.0.0.1:9980->9980/tcp collabora
But, I’m seeing the following error in my browser console:
Uncaught ReferenceError: $ is not defined
at (index):34
(anonymous) @ (index):34
nextcloud.mydomain.com/:37 Uncaught ReferenceError: OC is not defined
at Object.381 ((index):37)
at r ((index):37)
at (index):37
at (index):37
381 @ (index):37
r @ (index):37
(anonymous) @ (index):37
(anonymous) @ (index):37
nextcloud.mydomain.com/:44 Uncaught ReferenceError: OC is not defined
at (index):44
(anonymous) @ (index):44
nextcloud.mydomain.com/:49 Uncaught ReferenceError: OC is not defined
at Object.200 ((index):49)
at t ((index):49)
at (index):49
at (index):49
200 @ (index):49
t @ (index):49
(anonymous) @ (index):49
(anonymous) @ (index):49
nextcloud.mydomain.com/:66 Uncaught ReferenceError: OC is not defined
...
By the way, when I run these containers locally (e.g. http://localhost:8015) everything works. So, I’m guessing 1) because I’m behind a proxy and/or 2) HTTP. Any suggestions?