Try the fastest and simplest way to install ONLYOFFICE

[Resolved] HttpS for Linux server

IIS, Apache

[Resolved] HttpS for Linux server

Postby Kpol » Sat Feb 07, 2015 7:42 am

Hello,

I read about SSL and all concern Wind*** servers. Is it possible a guide for Linux Ubuntu Server ?

Thanks.
Last edited by Kpol on Mon Feb 09, 2015 3:12 pm, edited 1 time in total.
User avatar
Kpol
 
Posts: 97
Joined: Fri Feb 06, 2015 5:58 am
Location: Bangkok, Thailand.

[Resolved]: HttpS for Linux server

Postby Kpol » Mon Feb 09, 2015 3:11 pm

... Find by myself ....

Infos : Ubuntu server.

I do this on CLEAN Nginx. After make sure ok for https, then I install Onlyoffice !

Note : Onlyoffice SHOULD use by default a HTTPS! Why ? You see a server host your company infos and project use a NON Crypt url HTTP ?? ... :roll: :roll:


Install OpenSSL:

Code: Select all
aptitude install openssl



Create folder for SSL :

Code: Select all
mkdir /etc/nginx/yourwebname/


Go inside :

Code: Select all
cd /etc/nginx/yourwebname/



Create RSA key 1024bits :

Code: Select all
openssl genrsa -out server.key 1024



We create certificat :

Code: Select all
openssl req -new -key server.key -out server.csr


(Enter infos you want..)

Create now certificate format x509 by openssl :

Code: Select all
openssl x509 -req -days 3650 -in server.csr -signkey server.key -out server.crt



Now we add all keys infos in Nginx by edit

Code: Select all
sudo nano /etc/nginx/sites-available/default


remove all inside and add :

Code: Select all
server {
   listen 443;
   server_name localhost;

   root html;
   index index.html index.htm;

   ssl on;
   ssl_certificate /etc/nginx/yourwebname/server.crt;
   ssl_certificate_key /etc/nginx/yourwebname/server.key;

   ssl_session_timeout 5m;

   ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
   ssl_ciphers "HIGH:!aNULL:!MD5 or HIGH:!aNULL:!MD5:!3DES";
   ssl_prefer_server_ciphers on;

   location / {
      try_files $uri $uri/ =404;
   }
}


All should be ok with access to Nginx by https, now install Onlyoffice normally (...)....

Back in Nginx.

Code: Select all
sudo nano /etc/nginx/sites-available/onlyoffice


Code: Select all
server {
   listen 443;
   server_name localhost;

   root html;
   index index.html index.htm;

   ssl on;
   ssl_certificate /etc/nginx/yourwebname/server.crt;
   ssl_certificate_key /etc/nginx/yourwebname/server.key;

   ssl_session_timeout 5m;

   ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
   ssl_ciphers "HIGH:!aNULL:!MD5 or HIGH:!aNULL:!MD5:!3DES";
   ssl_prefer_server_ciphers on;

   location / {
      (!!!This part is generated bu Onlyoffice installation, do not modified it!!!)
   }
}


Do not forget to restart Nginx server to see change...

Et voila!
User avatar
Kpol
 
Posts: 97
Joined: Fri Feb 06, 2015 5:58 am
Location: Bangkok, Thailand.


Return to Web server configuration

Who is online

Users browsing this forum: No registered users and 1 guest