Key configuration files for nginx access to https/ssl

Source: Internet
Author: User
Tags soap md5

Https configuration

The code is as follows: Copy code

Server {
Listen 8443;
Server_name paycenter.hubs1.net;

Ssl on;
Ssl_certificate myserver. pem;
Ssl_certificate_key key. key;

Ssl_session_timeout 5 m;

Ssl_protocols SSLv2 SSLv3 TLSv1;
Ssl_ciphers HIGH :! ANULL :! MD5;
Ssl_prefer_server_ciphers on;

Location /{
Root html;
Index index.html index.htm;
Proxy_pass http: // paycentertest;
}
Error_page 500 502 503 x.html;
Location =/50x.html {
Root html;
}
}

Key https configuration files for nginx access

The code is as follows: Copy code


Server
{
Listen 432 ssl;
Server_name www.test.com;

Ssl on;
Ssl_certificate/usr/local/nginx/ssl/www.test.com. crt. pem;
Ssl_certificate_key/usr/local/nginx/ssl/www.test.com. key. pem;
Ssl_protocols SSLv3 TLSv1;
Ssl_ciphers ALL :! EXP :! ADH :! LOW :! SSLv2 :! MD5;
Ssl_session_timeout 5 m;
Ssl_prefer_server_ciphers on;

Access_log/data/logs/SSL_www.test.com_access.log;
Error_log/data/logs/SSL_www.test.com_error.log;

Root/www/test/ssl/web;

Index. php index.html index.htm;

If ($ uri !~ ^. *(. Xml |. html |. htm | index. php | soap. php | php. php | health. php | status |. swf |. css |. js |. gif |. png |. jpg |. jpeg |. ico )){
Rewrite ^/(. *) $/index. php? $1 last;
        }

Location ~ . Php $ {
Fastcgi_pass 127.0.0.1: 9000;
Fastcgi_index index. php;
Fcinclude GI. conf;
Fastcgi_param HTTPS on;
        }
}

Complete ssl configuration file for nginx instance access

The code is as follows: Copy code

Server
{
Listen 432 ssl;
Server_name www.test.com;

Ssl on;
Ssl_certificate/usr/local/nginx/ssl/www.test.com. crt. pem;
Ssl_certificate_key/usr/local/nginx/ssl/www.test.com. key. pem;
Ssl_protocols SSLv3 TLSv1;
Ssl_ciphers ALL :! EXP :! ADH :! LOW :! SSLv2 :! MD5;
Ssl_session_timeout 5 m;
Ssl_prefer_server_ciphers on;

Access_log/data/logs/SSL_www.test.com_access.log;
Error_log/data/logs/SSL_www.test.com_error.log;

Root/www/test/ssl/web;

Index. php index.html index.htm;

If ($ uri !~ ^. *(. Xml |. html |. htm | index. php | soap. php | php. php | health. php | status |. swf |. css |. js |. gif |. png |. jpg |. jpeg |. ico )){
Rewrite ^/(. *) $/index. php? $1 last;
        }

Location ~ . Php $ {
Fastcgi_pass 127.0.0.1: 9000;
Fastcgi_index index. php;
Fcinclude GI. conf;
Fastcgi_param HTTPS on;
        }
}

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.