Onlyoffice - requests to the server have been blocked by an extension

Hi,

I am facing problems installing Onlyoffice with nexcloud :frowning:

When I click on a document in nextcloud, I get a blank page saying “requests to the server have been blocked by an extension”

I have installed both Nextcloud and Onlyoffice using docker on the same server, but on different virtual hosts.

Here is my nextcloud conf file

<VirtualHost *:80>
        ServerName <nextcloud domain>
        Redirect permanent "/" "<nextcloud domain>"
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
        ServerAdmin ****@gmail.com
        ServerName <nextcloud domain>
        SSLEngine On
        ProxyPreserveHost On

         <IfModule mod_headers.c>
                Header always set
                Strict-Transport-Security "max-age=15552000; includeSubDomains"
                RewriteEngine On
                SetEnvIf Host "^(.*)$" THE_HOST=$1
                RequestHeader set X-Forwarded-Proto "https"
                ProxyAddHeaders Off
        </IfModule>

        ProxyPass "/" "http://localhost:3002/"
        ProxyPassReverse "/" "http://localhost:3002/"

        ErrorLog /var/log/apache2/<nextcloud domain>_error.log
        CustomLog /var/log/apache2/<nextcloud domain>_access.log combined
        Include /etc/letsencrypt/options-ssl-apache.conf

        SSLCertificateFile /etc/letsencrypt/live/<nextcloud domain>/fullchain.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/<nextcloud domain>/privkey.pem
</VirtualHost>
</IfModule>

Here is my onlyoffice conf file

<VirtualHost *:80>
        ServerName <onlyoffice domain>
        Redirect permanent "/" "<onlyoffice domain>/"
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
       ServerAdmin *****@gmail.com
        ServerName <onlyoffice domain>
        SSLEngine On

        ProxyPreserveHost On
        ProxyPass "/" "http://localhost:3003/"
        ProxyPassReverse "/" "http://localhost:3003/"

        <IfModule mod_headers.c>
                RewriteEngine On
                SetEnvIf Host "^(.*)$" THE_HOST=$1
                RequestHeader set X-Forwarded-Proto "https"
                ProxyAddHeaders Off
        </IfModule>

        ErrorLog /var/log/apache2/<onlyoffice domain>_error.log
        CustomLog /var/log/apache2/<onlyoffice domain>_access.log combined
        Include /etc/letsencrypt/options-ssl-apache.conf
        SSLCertificateFile /etc/letsencrypt/live/<onlyoffice domain>/fullchain.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/<onlyoffice domain>/privkey.pem
</VirtualHost>
</IfModule>

Any ideas why this is not working ? it has been driving me crazy for couple of days now.

Thank you,

Konrad

Ok, I found the problem : I hadn’t activate the header module in apache. Once done, it works.

1 Like

Hi Konradh,

I am facing same problem, can you please tel me the procedure how can i add this. I am new in this field.