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:
- 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
- OR Create self-signed SSL certificates using:
- Configure nginx for https for onlyoffice document server using:
- cd /etc/onlyoffice/documentserver/nginx
- 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
- Edit /etc/onlyoffice/documentserver/nginx/onlyoffice-documentserver.conf as follows
- Put correct value of server_name
- 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
- 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
- Append following before last include line
- location ~ /.well-known/acme-challenge {
- root /var/www/onlyoffice/;
- allow all;
- }
- Test Nginx configuration and reload
- nginx -t
- systemctl reload nginx
- 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