Nextcloud 15.0.5, Docker 18.09.3, Ubuntu 18.04.2
When I try to do certain things on Nextcloud, such as logging out, it redirects me to localhost:2080’s webroot (which is the port I have redirected out of the container for the internal Apache server) instead of redirecting me to my public web address. I’ve already looked at my config.php’s trusted_domains and overwrite.cli.uri and both of them are set to my public web address. Below you can find my Apache configs (I have Let’s Encrypt enabled on the site).
***/etc/apache2/sites-available/nextcloud.conf***
<VirtualHost *:80>
ServerName <PUBLIC_WEB_ADDRESS>
ProxyPass "/" "http://localhost:2080/"
ProxyPassReverse "/" "http://localhost:2080/"
RewriteEngine on
RewriteCond %{SERVER_NAME} =<PUBLIC_WEB_ADDRESS>
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
***/etc/apache2/sites-available/nextcloud-le-ssl.conf***
<VirtualHost *:443>
ServerName <PUBLIC_WEB_ADDRESS>
ProxyPass "/" "http://localhost:2080/"
ProxyPassReverse "/" "http://localhost:2080/"
SSLCertificateFile /etc/letsencrypt/live/<PUBLIC_WEB_ADDRESS>/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/<PUBLIC_WEB_ADDRESS>/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
Header always set Referrer-Policy "no-referrer"
</IfModule>
</VirtualHost>
</IfModule>
Is my Apache config wrong? Is there somewhere I’m missing that I have to configure? Thanks for the help!