Nginx installation SSL basic tutorial

Source: Internet
Author: User
Tags install openssl

The http://wiki.nginx.org/Modules#Standard_HTTP_modules comes with all the basic modules and modules that need to be added.

1. Install nginx with SSL module

 

Wget http://nginx.org/download/nginx-0.8.52.tar.gz tar zxvf nginx-0.8.52.tar.gz chown root: Root nginx-0.8.52-r apt-Get install libpcre3 libpcre3-dev apt-Get install OpenSSL apt-Get install libssl-Dev. /configure -- prefix =/usr/local/nginx -- with-http_stub_status_module -- with-http_ssl_module -- with-http_realip_module make install

2. Configure the nginx configuration file

SSL on; ssl_certificate/etc/nginx/nginx_pas/*. CRT; ssl_certificate_key/etc/nginx/nginx_pas/*. Key;

3. Configure the nginx Conf. All nginx conf files require HTTPS access.

Location/{rewrite ^/(. *) https: // *. com/$1 permanent; # root/var/www/nginx-default; # index index.html index.htm ;}

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.