配置nginx支持ssl服务器—HTTPS

下文摘自: http://docs.bigbluebutton.org/install/install.html

 

 

Configuring HTTPS on BigBlueButtonAnchor link for: configuring https on bigbluebutton

You’ll want to add HTTPS support to your BigBlueButton server for increased security. Also, as of Chrome 47, Chrome users will be unable to share their microphone via WebRTC unless BigBlueButton is loaded via HTTPS.

Configure BigBlueButton to use a domain nameAnchor link for: configure bigbluebutton to use a domain name

In order to obtain a valid SSL certificate for your server, you must configure the server to use a domain name that you own or control.

For the purposes of documentation, we will be using the domain name “example.com”, with a BigBlueButton server hosted at “bigbluebutton.example.com”.

Please run the commands as root.

Once you have a domain name and have configured it with a DNS host, add an A record pointing to your server. You can then use the bbb-conf setip command to configure BigBlueButton to use that domain name, for example:

bbb-conf --setip bigbluebutton.example.com

Obtain an SSL certificateAnchor link for: obtain an ssl certificate

In order to serve BigBlueButton over HTTPS, you need to have a valid SSL certificate. A domain validated (sometimes called “class 1”) certificate with a 2048 bit RSA key and SHA-256 checksum is the current recommended minimum, and it should be sufficient.

There are a number of providers that you could obtain a certificate from. Many domain name sales companies also offer certificates.

Some well known large providers of SSL certificates include Comodo, Symantec, GoDaddy, GlobalSign, and DigiCert. In addition, free SSL certificates are available from StartSSL and CACert, with some caveats: StartSSL certificates can’t be revoked without paying a service fee, and most people do not have the root for CACert installed in their web browser.

Each provider will give you a series of steps for generating the certificate, but they will normally include generating a private key and certificate request locally, sending the certificate request to be signed, and then receiving back the signed certificate after they have performed any required verification steps.

To install the certificate in BigBlueButton, you will need to have files for the certificate, private key, and any intermediate certificates in PEM format.

Configure nginx to use HTTPSAnchor link for: configure nginx to use https

Depending on your CA, you should now have 2 or more files, as follows:

  • Certificate
  • Private key
  • Intermediate certificate (there may be more than one, or could be none)

The next step is to install the files on the server.

Create the directory /etc/nginx/ssl:

mkdir /etc/nginx/ssl

And now create the private key file for nginx to use (replace the hostname in the filename with your own). In addition, fix the permissions so that only root can read the private key:

cat >/etc/nginx/ssl/bigbluebutton.example.com.key <<‘END‘
Paste the contents of your key file here
END
chmod 0600 /etc/nginx/ssl/bigbluebutton.example.com.key

And the certificate file. Note that nginx needs your server certificate and the list of intermediate certificates together in one file (replace the hostname in the filename with your own):

cat >/etc/nginx/ssl/bigbluebutton.example.com.crt <<‘END‘
Paste (in order) the contents of the following files:
  1. The signed certificate from the CA
  2. In order, each intermediate certificate provided by the CA (but do not include the root).
END

In addition, we’ll generate a set of 2048-bit diffie-hellman parameters to improve security for some types of ciphers. This step can take several minutes to complete, particularly if run on a virtual machine.

openssl dhparam -out /etc/nginx/ssl/dhp-2048.pem 2048

Now we can edit the nginx configuration to use SSL. Edit the file /etc/nginx/sites-available/bigbluebutton to add the marked lines. Ensure that you’re using the correct filenames to match the certificate and key files you created above.

server {
  server_name bigbluebutton.example.com;
  listen 80;
  listen 443 ssl;
  ssl_certificate /etc/nginx/ssl/bigbluebutton.example.com.crt;
  ssl_certificate_key /etc/nginx/ssl/bigbluebutton.example.com.key;
  ssl_session_cache shared:SSL:10m;
  ssl_session_timeout 10m;
  ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  ssl_ciphers "ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS:!AES256";
  ssl_prefer_server_ciphers on;
  ssl_dhparam /etc/nginx/ssl/dhp-2048.pem;
  [...]

For reference, note that the SSL settings used above are based on those proposed in https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers/ and provide support for all modern browsers (including IE8, but not IE6, on Windows XP). Please note that recommended SSL settings are subject to change as new vulnerabilities are found.

 

 

Test your HTTPS configurationAnchor link for: test your https configuration

In order to ensure you didn’t make any mistakes that could cause security compromises, please test your HTTPS configuration. A well-respected site that can do a series of automated tests is https://www.ssllabs.com/ssltest/ - simply enter your server’s hostname, optionally check the “Do not show results” checkbox if you would like to keep it private, then Submit.

At time of writing, the configuration shown on this page should achieve an “A” ranking in the SSL Labs test page.

时间: 2024-11-08 07:43:30

配置nginx支持ssl服务器—HTTPS的相关文章

使用HttpClient发送HTTPS请求以及配置Tomcat支持SSL

这里使用的是HttpComponents-Client-4.1.2 1 package com.jadyer.util; 2 3 import java.io.File; 4 import java.io.FileInputStream; 5 import java.io.FileNotFoundException; 6 import java.io.IOException; 7 import java.security.KeyManagementException; 8 import java

配置nginx支持pathinfo

服务器运行的nginx+php,centos的系统.因需新部署一个网站,需要配置nginx支持pathinfo功能.网上各种查资料,终于搞定. 首先查看php.ini文件,查找cgi.fix_pathinfo=0,如不是0,改为0.重启php程序. 然后修改nginx配置文件: location ~ \.php {                    ------(去掉php后面的$) fastcgi_pass   127.0.0.1:9000; fastcgi_index  index.ph

配置Nginx支持php,出现No input file specified错误的解决方法

今天有一个项目上有一个模块,程序使用php写的,需要的服务器上搭建PHP的环境,由于我公司的服务器都是Windows系列的,本来前两天买了一台新的服务器,上面搭建了IIS服务器,跑的一个ASP的项目,现在又要部署一个PHP的项目,本想直接在IIS上配置让其支持PHP,但一想性能可能不会很高,于是又想用Apache2.2搭建一个环境,这个重量级的有点大,于是又到了Nginx,这个很小的,使用起来很方便,功能是很强大的,配置好后,访问php文件,出现 "No input file specified

四、配置nginx支持php

                                四.配置nginx支持php     在Ubuntu下搭建LNMP环境.编译安装mysql,nginx,php.最后在LNMP前提下安装composer,并且安装laravel框架.第四步,配置nginx支持php. 首先建立存放网页文件的目录,执行"sudo mkdri /usr/local/server/www".然后进入到该目录中,"cd/usr/local/server/www". 修改ngin

Linux下安装php环境并且配置Nginx支持php-fpm模块[www]

Linux下安装php环境并且配置Nginx支持php-fpm模块 http://www.cnblogs.com/freeweb/p/5425554.html 5分钟搭建 nginx +php --------------(LNMP)新手专用 http://blog.csdn.net/dyllove98/article/details/41120789 配置Nginx来支持php http://www.cnblogs.com/jecyhw/p/5504855.html nginx+php的配置与

centos下配置nginx支持php

添加nginx 默认主页index.php vim /etc/nginx/conf.d/default.conf location / { root   /usr/share/nginx/html; index  index.html index.htm index.php; } 配置nginx支持php vim /etc/nginx/conf.d/default.conf # pass the PHP scripts to FastCGI server listening on 127.0.0

配置NGINX支持中文URL 中文文件名或目录404无法访问的解决方法

Description 两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面.它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止.可是它们出发之前忘记了一件很重要的事情,既没有问清楚对方的特征,也没有约定见面的具体位置.不过青蛙们都是很乐观的,它们觉得只要一直朝着某个方向跳下去,总能碰到对方的.但是除非这两只青蛙在同一时间跳到同一点上,不然是永远都不可能碰面的.为了帮助这两只乐观的青蛙,你被要求写一个程序来判断这两只青蛙是否能够碰面,会在什么时候碰面. 我们把这

CentOS 中 配置 Nginx 支持 https

一.基础设置: 1.yum -y update 2.yum -y install openssl* 3.cd /usr/local/nginx/conf 4.mkdir ./ssl 5.cd ./ssl # 在ssl目录下用openssl创建 .key 私钥文件和 .crt 证书文件 6.openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout www.ushark.net.key -out www.ushark.net.crt 7

配置nginx支持https

 一:开启Nginx的SSL模块 Nginx如果未开启SSL模块,配置Https时提示如下错误: nginx: [emerg] the "ssl" parameter requires ngx_http_ssl_module in /usr/local/nginx/conf/nginx.conf 解释:nginx缺少http_ssl_module模块,需要在已安装的nginx中添加ssl模块. 说明:我的nginx安装目录为:/usr/local/nginx , 源码包在/usr/sr