CentOS 7.x Configure onlyoffice Document nginx server for https

From Notes_Wiki

Home > CentOS > CentOS 7.x > Web Based Tools > CentOS 7.x onlyoffice > CentOS 7.x Configure onlyoffice Document nginx server for https

Note that https is required for integration with owncloud. For configuring https use following steps:

  1. Obtain Lets encrypt SSL certificates using Installing lets-encrypt SSL certificate
    OR Create self-signed SSL certificates using:
    mkdir /etc/ssl/private
    chmod 700 /etc/ssl/private
    openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout /etc/ssl/private/nginx-selfsigned.key -out /etc/ssl/certs/nginx-selfsigned.crt
    Country Name (2 letter code) [AU]: IN
    State or Province Name (full name) [Some-State]: Telangana
    Locality Name (eg, city) []: Hyderabad
    Organization Name (eg, company): Rekall Software
    Organizational Unit Name (eg, section) []: IT
    Common Name (e.g. server FQDN or YOUR name) []: onlyoffice.rnd.com
    Email Address []: saurabh@example.com
  2. Configure nginx for https for onlyoffice document server using:
    1. cd /etc/onlyoffice/documentserver/nginx
    2. cp onlyoffice-documentserver-ssl.conf.template onlyoffice-documentserver.conf
      Note that /etc/nginx/conf.d/onlyoffice-documentserver.conf is symbolic link to /etc/onlyoffice/documentserver/nginx/onlyoffice-documentserver.conf
    3. Edit /etc/onlyoffice/documentserver/nginx/onlyoffice-documentserver.conf as follows
      1. Put correct value of server_name
      2. Replace {{SSL_CERTIFICATE_PATH}} with /etc/ssl/certs/nginx-selfsigned.crt in case of self-signed certificate.
        In case of lets encrypt path would be /etc/letsencrypt/live/<fqdn>/fullchain.pem
      3. Replace {{SSL_KEY_PATH}} with /etc/ssl/private/nginx-selfsigned.key in case of self-signed certificate.
        In case of lets encrypt path would be /etc/letsencrypt/live/<fqdn>/privkey.pem
      4. Append following before last include line
        location ~ /.well-known/acme-challenge {
        root /var/www/onlyoffice/;
        allow all;
        }
  3. Test Nginx configuration and reload
    nginx -t
    systemctl reload nginx
  4. Visit https://onlyoffice.your-domain.com in web browser to verify OnlyOffice document server is running correctly in HTTPS mode.


Refer:


Home > CentOS > CentOS 7.x > Web Based Tools > CentOS 7.x onlyoffice > CentOS 7.x Configure onlyoffice Document nginx server for https