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; } } |