I can't login to private server docspace website from external domain. Can login through documents mobile app

Do you want to: Suggest a feature / Report a bug / Ask a how-to question
For feature suggestions, describe the result you would like to achieve in detail.
For bug reports, provide the steps to reproduce and if possible a minimal demo of the problem.
DocSpace version: ONLYOFFICE DocSpace v.3.6.1.8536 ONLYOFFICE Docs v.4.1.5.1
Type of installation of the DocSpace (docker, deb/rpm, exe, please point us to the installation guide that you used as well): Docker install script
OS: Ubuntu 24.04LTS
Browser version: Firefox 146.01 or Chrome 143.0.7499.169
Additional information:
Any relevant details about the situation. If you’ve modified configuration files or are using a proxy server that might affect the situation, please mention it. You can also attach images and videofile to the post (or to place them to external storage)
Apache Reverse Proxy:
Virtual host file-

<VirtualHost *:80>
    ServerName office.webhoran.com
    Redirect permanent / https://office.webhoran.com
</VirtualHost>

<VirtualHost *:443>
    ServerName office.webhoran.com
   
    SSLEngine on
    SSLCertificateFile /etc/cloudflare/certs/office.webhoran.com/origin.crt
    SSLCertificateKeyFile /etc/cloudflare/certs/office.webhoran.com/private.key
    SSLOpenSSLConfCmd DHParameters /etc/cloudflare/certs/office.webhoran.com/dhparam.pem

    ProxyPreserveHost On
    SetEnvIf Host "^(.*)$" THE_HOST=$1   
    RequestHeader set X-Forwarded-Proto "https"
    RequestHeader set X-Forwarded-Host %{HTTP_HOST}e


    RewriteEngine on
    RewriteCond %{HTTP:Upgrade} websocket [NC]
    RewriteCond %{HTTP:Connection} upgrade [NC]
    RewriteRule ^/?(.*) "ws://192.168.1.73:9000/$1" [P,L]

    
    # General Proxy
    ProxyPass / http://192.168.1.73:9000/ 
    ProxyPassReverse / http://192.168.1.73:9000/

    LogLevel debug
    ErrorLog ${APACHE_LOG_DIR}/docs_error.log
    CustomLog ${APACHE_LOG_DIR}/docs_access.log combined

</VirtualHost>

At office.webhoran.com I can not login. I can login though the android Documents app at that url office.webhoran.com but can’t view or edit documents. Can only create, download or upload documents. i can not login via browser at that url. If this is normal document app behavior could it be documented better please.

I can login at the local ip 192.168.1.73:9000 and it is functional.

How do I view documents in the mobile app which gives the error viewer is enabled. Or login to the external website? Is there something wrong with my Apache Reverse proxy settings? The Apache and onlyoffice docspace are on separate machines.

<VirtualHost *:80>
    ServerName office.webhoran.com
    Redirect permanent / https://office.webhoran.com
</VirtualHost>

<VirtualHost *:443>
    ServerName office.webhoran.com

    SSLEngine on
    SSLCertificateFile /etc/cloudflare/certs/office.webhoran.com/origin.crt
    SSLCertificateKeyFile /etc/cloudflare/certs/office.webhoran.com/private.key
    SSLOpenSSLConfCmd DHParameters /etc/cloudflare/certs/office.webhoran.com/dhparam.pem


ProxyPreserveHost On
ProxyAddHeaders On

<Proxy *>
    AllowMethods GET POST PUT DELETE OPTIONS
</Proxy>

RequestHeader set Content-Type "application/json" "expr=-z %{req:Content-Type}"

    RequestHeader set X-Forwarded-Proto "https"
    RequestHeader set X-Forwarded-Host "office.webhoran.com"
    RequestHeader set Host "office.webhoran.com"

    
    Header set Access-Control-Allow-Origin "*"
    SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1

    RequestHeader set X-Forwarded-Ssl on


    RewriteEngine on
    RewriteCond %{HTTP:Upgrade} websocket [NC]
    RewriteCond %{HTTP:Connection} upgrade [NC]
    RewriteRule ^/?(.*) "ws://192.168.1.73:9000/$1" [P,L]


    # General Proxy
    ProxyPass / http://192.168.1.73:9000/
    ProxyPassReverse / http://192.168.1.73:9000/

    Header edit Location ^http:// https://

    ProxyTimeout 600
#    LogLevel debug
    ErrorLog ${APACHE_LOG_DIR}/docs_error.log
    CustomLog ${APACHE_LOG_DIR}/docs_access.log combined

I fixed the Android app view problem with the above virual host file

and changinge the .env file to include
EXTRA_HOSTS=“office.webhoran.com:172.19.0.17”
APP_URL_PORTAL=https://office.webhoran.com

but I still can’t login via web at the url https://office.webhoran.com

Hello @richard378

Unfortunately, we do not have any samples for proxying DocSpace. If you want to proxy DocSpace, then you have to keep in mind that there are many services in Docker network that work all together, thus proxying only main page may be insufficient.