Help with Apache and OnlyOffice

I’m having trouble with getting NextCloud to load the connector for OnlyOffice. My setup is: Onlyoffice VM -->Apache Reverse Proxy (Handles HTTPS certs as well) → Outside world. When going to https://onlyoffice.mydomain.com the page loads and says everything is well and good. Now when putting that direct address into NextCloud, the connector never loads, doesn’t give any error message or anything. It shows up with a blank white page. One other thing to note, when I go to NextCloud on the internal IP address and then put the VM internal IP address into the NextCloud connector admin page, everything loads and works 100% as it should. That makes me believe it is something to do with my reverse proxy setup. I’ve checked the logs for apache and nothing comes up. I’ve looked through the logs in Nextcloud and nothing really relevant shows either. I believe it’s a config through apache that is giving me the trouble.

Here is that code:

<IfModule mod_ssl.c>
<VirtualHost *:80>
ServerName onlyoffice.mydomain.com
ServerAdmin [email protected]
RewriteEngine on
RewriteCond %{SERVER_NAME} =onlyoffice.mydomain.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent]
</VirtualHost>
<VirtualHost *:443>
ServerName onlyoffice.mydomain.com
ServerAdmin [email protected]
<proxy *>
AddDefaultCharset off
Order Allow,Deny
Allow from all
</proxy>
ProxyRequests     Off
ProxyPreserveHost On
<location />
RequestHeader unset Accept-Encoding
ProxyPass http://192.168.0.22:78/
ProxyPassReverse http://192.168.0.22:78/
Order allow,deny
Allow from All
</location>
ProxyPass "/websocket" "wss://192.168.0.22:78/websocket"
ProxyPassReverse "/websocket" "wss://192.168.0.22:78/websocket"
SSLCertificateFile /usr/local/etc/letsencrypt/live/onlyoffice.mydomain.com/fullchain.pem
SSLCertificateKeyFile /usr/local/etc/letsencrypt/live/onlyoffice.mydomain.com/privkey.pem
</VirtualHost>
</IfModule>

Not certain, but I think you may want to take a look at your rewriteRule. There is a space between your ^ and the https://... maybe that space shouldn't be there.

If you do change it you'll need to restart the service before the changes will take affect.

Probably should make a backup of your current config.txt, just for sysadmin 101.

Hopefully, this helps.

That change is not correct. The space is needed to make the RewriteRule work correctly, otherwise the conf fails and does not work as needed.

Gave it my best! Sorry it didn't fix it. If I come up with something else I'll post.

Best