CentOS 7 + Plesk Onyx 17.5.3

Hi,
I’m trying to install Collabora, but I get “Internal server error”.

Installed Collabora/code in Docker, but I can’t understand what the problem is.

I tried:

nextcloud installed on cloud.domain.tld
/etc/nginx/conf.d/cloud.domain.conf
with this code:

Summary
   server {
    listen       443 ssl;
    server_name  cloud.domain.tld;

    ssl_certificate /usr/local/psa/var/modules/letsencrypt/etc/live/cloud.domain.tld/cert.pem;
    ssl_certificate_key /usr/local/psa/var/modules/letsencrypt/etc/live/cloud.domain.tld/privkey.pem;
    
    # static files
    location ^~ /loleaflet {
        proxy_pass https://localhost:9980;
        proxy_set_header Host $http_host;
    }

    # WOPI discovery URL
    location ^~ /hosting/discovery {
        proxy_pass https://localhost:9980;
        proxy_set_header Host $http_host;
    }

   # main websocket
   location ~ ^/lool/(.*)/ws$ {
       proxy_pass https://localhost:9980;
       proxy_set_header Upgrade $http_upgrade;
       proxy_set_header Connection "Upgrade";
       proxy_set_header Host $http_host;
       proxy_read_timeout 36000s;
   }
   
   # download, presentation and image upload
   location ~ ^/lool {
       proxy_pass https://localhost:9980;
       proxy_set_header Host $http_host;
   }
   
   # Admin Console websocket
   location ^~ /lool/adminws {
       proxy_pass https://localhost:9980;
       proxy_set_header Upgrade $http_upgrade;
       proxy_set_header Connection "Upgrade";
       proxy_set_header Host $http_host;
       proxy_read_timeout 36000s;
   }
}

(domain.tld is my domain/tld, naturally)

thanks for any help

I’m using Plesk 17.0.17. I have entered that code into additional directives on Plesk, not .conf.

For example:
main server: www.main.com/nextcloud
collabora server: office.main.com/nextcloud

Enter that code(server { ~~~~ ) in the additional directive field of this office.main.com.
I do not know the setting in one domain(server). That is written in the manual. Write it in the additional directive field.

env[HOSTNAME] = $HOSTNAME
env[PATH] = ******** The path displayed by "printenv PATH" command *******
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp

I entered the above into the following file.
/opt/plesk/php/{PHP VERSION NUMBER}/etc/php-fpm.conf

Installation for Plesk seems to be difficult. Plesk seems to be unique.
I do not know if these are correct methods. It seems that direct description in nginx.conf is being ignored. Since there was no one who knew Collabora and PLESK around me, I installed it while studying on the internet by my own study. I also used this forum.

1 Like

Thank you Zoo3, but it’s not all perfectly clear yet for me.

printenv path is php.ini path?
or “/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin”

I also tried to install Collabora / code directly from Docker, but it does not let me configure the ports manually.
At the moment, in Docker Settings (collabora image) I see:
DOMAIN: cloud.\domain.\tld
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
domain (lowercase!!): localhost
LC_TYPE: en:US.UTF-8
Manual port map: 9980:9980

If I confirm, it gives me an error. I have to change lowercase “domain” var in uppercase “DOMAIN”.

Details and registers windows are always blank.

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

–>
When you enter “printenv PATH” command the your server’s path will be displayed. Write the path to env[PATH].

I also tried to install Collabora / code directly from Docker, but it does not let me configure the ports manually.
At the moment, in Docker Settings (collabora image) I see:

Following is the site introduced in nextcloud.
https://icewind.nl/entry/collabora-online/

docker run -t -d -p 9980:9980 -e "domain=example.com" --cap-add MKNOD collabora/code

In that way you need to install the Docker container from the command line. You should not use the PLESK UI. If you use PLESK UI, variables such as “domain” will be capitalized. They should be lowercase. Furthermore do not edit containers with PLESK UI after you enter on this command line. In other words, in the case of Collabora, you should never use PLESK UI.

1 Like

Try again to start from scratch. :slight_smile:

I use “domain=example.com” even if I use it in a subdomain?

docker run -t -d -p 9980:9980 -e "domain=cloud.example.com" --cap-add MKNOD collabora/code

is correct?
Well, received: NEVER touch the Plesk UI for Collabora. Never!

Can I delete cloud.domain.conf in /etc/nginx/conf.d?

Well:

via ssh:
docker run -t -d -p 9980:9980 -e "domain=cloud.example.com" --cap-add MKNOD collabora/code
where example.com is my domain.

file /opt/plesk/php/7.0/etc/php-fpm.conf added:

env[HOSTNAME] = $HOSTNAME
env[PATH] = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp

file /etc/nginx/conf.d/cloud.domain.conf

server {
listen 443 ssl;
server_name office.domain.ovh;

ssl_certificate /usr/local/psa/var/modules/letsencrypt/etc/live/cloud.domain.ovh/cert.pem;
ssl_certificate_key /usr/local/psa/var/modules/letsencrypt/etc/live/cloud.domain.ovh/privkey.pem;

# static files
location ^~ /loleaflet {
    proxy_pass https://localhost:9980;
    proxy_set_header Host $http_host;
}

# WOPI discovery URL
location ^~ /hosting/discovery {
    proxy_pass https://localhost:9980;
    proxy_set_header Host $http_host;
}

main websocket

location ~ ^/lool/(.*)/ws$ {
proxy_pass https://localhost:9980;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “Upgrade”;
proxy_set_header Host $http_host;
proxy_read_timeout 36000s;
}

download, presentation and image upload

location ~ ^/lool {
proxy_pass https://localhost:9980;
proxy_set_header Host $http_host;
}

Admin Console websocket

location ^~ /lool/adminws {
proxy_pass https://localhost:9980;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “Upgrade”;
proxy_set_header Host $http_host;
proxy_read_timeout 36000s;
}
}

After that: reload/restart nginx, restart docker…

Doesn’t works.

Excuse me, I didn’t notice being added. Did you already be able to use Collabora?

Example:
nextcloud.sample.com # Nextcloud installed.
office.sample.com # for Collabora

The part of “cloud.domain.conf” you wrote. (It is the part below “#static files”.) I wrote this on additional directives(in apache and nginx setting) on office.sample.com. I have not written it in the .conf file. Plesk seems to ignore them.

Make a docker container:

docker run -t -d -p 9980:9980 -e "domain=nextcloud.sample.com" --cap-add MKNOD collabora/code

Can you use Collabora?