Try the fastest and simplest way to install ONLYOFFICE

HTTPS configuration on Windows Server 2012 R2

IIS, Apache

Re: HTTPS configuration on Windows Server 2012 R2

Postby Dean » Mon Oct 06, 2014 12:54 pm

Please make a copy of this file. After that:
- Replace the contents of the file as follows:

(function () {
var fs = require ('fs'),
path = require ('path'),
config = {};

module.exports = config;

config.httpPort = 80;
config.httpsPort = 443;
config.coauthoringPort = 8000;
config.spellcheckerPort = 8080;
config.docservicePort = 8086;
config.teamlabPort = 8087;
config.sslCertPath = '../Cert/https-cert.pem';
config.httpsEnabled = fs.existsSync (config.sslCertPath);

}). call (this);

- Put the certificate in PEM format on the computer where you installed server solution ONLYOFFICE.
- Specify the full path to the file, using the slash (/) in the file ONLYOFFICE config.js.
- Then restart the service OnlyOfficeRouter.
Dean
 
Posts: 700
Joined: Tue Sep 30, 2014 11:04 am

Re: HTTPS configuration on Windows Server 2012 R2

Postby Dean » Wed Oct 08, 2014 9:47 am

Please change the string
'config.sslCertPath = '../Cert/Certificate.pem';'
to the following:
'config.sslCert = 'C:/Program Files (x86)/Ascensio System SIA/ONLYOFFICE/Cert/Certificate.pem';'
Also could you please check the Certificate.pem file and specify if there is a string in this file called 'private.key'?
Dean
 
Posts: 700
Joined: Tue Sep 30, 2014 11:04 am

Re: HTTPS configuration on Windows Server 2012 R2

Postby Dean » Thu Oct 09, 2014 6:55 am

Could you please provide the content of the config.js file?
Also could you please specify the following moments:

- If the port 443 is opened?
- If you've restarted the OnlyOfficeRouter service after changing config.js file?
Dean
 
Posts: 700
Joined: Tue Sep 30, 2014 11:04 am

Re: HTTPS configuration on Windows Server 2012 R2

Postby Dean » Wed Nov 05, 2014 3:46 pm

Could you please provide the content of the config.js file?
Dean
 
Posts: 700
Joined: Tue Sep 30, 2014 11:04 am

Re: HTTPS configuration on Windows Server 2012 R2

Postby tobi » Tue Nov 11, 2014 11:55 am

I also have some difficulties getting https for OnlyOffice to work ! These are the steps I've done:

1) Created and placed PEM certificate

I placed my PEM certificate at "C:\Program Files (x86)\Ascensio System SIA\ONLYOFFICE\MyCert.pem" on my Windows Server 2012 R2. File encoding is ANSI.
The certificate files looks like this (all certificate data has been replaced):
-----BEGIN RSA PRIVATE KEY-----abcdefgh....abcdefgh-----END RSA PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
xyzxyzxyzxyzxyzxyzxyz
-----END CERTIFICATE-----

2) Router config file
My router config file has the following content. Please note that I did some changes to the original port configuration, but in HTTP mode it works fine:

(function(){
var fs = require('fs'),
path = require('path'),
config = {};

module.exports = config;

config.httpPort = 8080;
config.httpsPort = 8082;
config.coauthoringPort = 8000;
config.spellcheckerPort = 8088;
config.docservicePort = 8086;
config.teamlabPort = 8087;

config.sslCertPath = 'C:/Program Files (x86)/Ascensio System SIA/ONLYOFFICE/MyCert.pem';

var certDir = path.resolve(__dirname, 'ssl_cert'),
files;

if (fs.existsSync(certDir)) {
files = fs.readdirSync(certDir);
for (var i = 0; i < files.length; i++) {
if (files[i] && path.extname(files[i]) == '.pem'){
config.sslCert = path.join(certDir, files[i]);
break;
}
}
}

}).call(this);

By using standard http I call my installation by using http://<mydomain>:8080/ and this works (but I do not get forwarded to https port 8082). When I try https://<mydomain>:8082 or http://<mydomain>:8082 the server does not respond.
Is there any logging in OnlyOffice where I can verify that the certificate is valid and processed correctly by the Router (?) service ?
tobi
 
Posts: 35
Joined: Mon Sep 29, 2014 11:31 am

Re: HTTPS configuration on Windows Server 2012 R2

Postby Dean » Tue Nov 11, 2014 1:42 pm

Could you please specify if the port #8082 is opened in firewall? Or may be there are any other programs which use this one?
Dean
 
Posts: 700
Joined: Tue Sep 30, 2014 11:04 am

Re: HTTPS configuration on Windows Server 2012 R2

Postby tobi » Tue Nov 11, 2014 3:30 pm

Sorry, I forgot to mention. The port 8082 is free and open !
tobi
 
Posts: 35
Joined: Mon Sep 29, 2014 11:31 am

Re: HTTPS configuration on Windows Server 2012 R2

Postby Dean » Wed Nov 12, 2014 2:54 pm

We're currently trying to detect the issue. I shall inform you as soon as I get any news.
Dean
 
Posts: 700
Joined: Tue Sep 30, 2014 11:04 am

Re: HTTPS configuration on Windows Server 2012 R2

Postby tobi » Sun Nov 30, 2014 7:16 pm

Is there any update on this topic ? I would like to switch to SSL as soon as possible ...
tobi
 
Posts: 35
Joined: Mon Sep 29, 2014 11:31 am

Re: HTTPS configuration on Windows Server 2012 R2

Postby AnaMih » Wed Dec 03, 2014 2:41 pm

1) Please, provide us the app.js file you may find it here: c:\Program Files\Ascensio System SIA\ONLYOFFICE\Router\ via e-mail support@onlyoffice.com
2) Also try this:
(function(){
var fs = require('fs'),
path = require('path'),
config = {};

module.exports = config;

config.httpPort = 8080;
config.httpsPort = 8082;
config.coauthoringPort = 8000;
config.spellcheckerPort = 8088;
config.docservicePort = 8086;
config.teamlabPort = 8087;

config.sslCert = 'C:/Program Files (x86)/Ascensio System SIA/ONLYOFFICE/MyCert.pem';

}).call(this);
User avatar
AnaMih
 
Posts: 264
Joined: Mon Aug 25, 2014 10:15 am

Next

Return to Web server configuration

Who is online

Users browsing this forum: No registered users and 2 guests