Last active
April 10, 2017 23:51
-
-
Save pestilence669/9733f010a0f0f05e1ae9 to your computer and use it in GitHub Desktop.
Nginx SSL configuration to proxy localhost:443 to localhost:80
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
worker_processes 1; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; | |
default_type application/octet-stream; | |
send_timeout 1800; | |
sendfile on; | |
keepalive_timeout 6500; | |
# HTTPS proxy to localhost:80 | |
server { | |
listen 443; | |
server_name localhost; | |
ssl on; | |
ssl_certificate server.crt; | |
ssl_certificate_key server.key; | |
ssl_session_timeout 5m; | |
ssl_protocols SSLv2 SSLv3 TLSv1; | |
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP; | |
ssl_prefer_server_ciphers on; | |
location / { | |
proxy_pass http://localhost:80; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Client-Verify SUCCESS; | |
proxy_set_header X-Client-DN $ssl_client_s_dn; | |
proxy_set_header X-SSL-Subject $ssl_client_s_dn; | |
proxy_set_header X-SSL-Issuer $ssl_client_i_dn; | |
proxy_read_timeout 1800; | |
proxy_connect_timeout 1800; | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-----BEGIN CERTIFICATE----- | |
MIIDuDCCAqACCQD8JUI0ybl7NDANBgkqhkiG9w0BAQUFADCBnTELMAkGA1UEBhMC | |
VVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lzY28x | |
FjAUBgNVBAoTDVBhdWwgQ2hhbmRsZXIxEjAQBgNVBAMTCWxvY2FsaG9zdDE1MDMG | |
CSqGS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UC7Jo | |
G0XOz27TglgDPvVxLH2++hgH9Vwbxy3Cjt3NQyJJA4SZkhtvn7KUc+uwUnI= | |
-----END CERTIFICATE----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-----BEGIN RSA PRIVATE KEY----- | |
MIIEowIBAAKCAQEA0c1TqZ6m929BIimZeaqMc3RzZ2ffRvZU376eGJwzdeYWXuS3 | |
Nljzqi9mQMHypkjEwVPVwxFX7pT5C1jqyFWLHTONo3cbVZIH1ZhgrpD3FVkn/++n | |
yfjMDMIRFqPMr+bcSXdbtJGKnHJU608+qogwG+eSsKp2jwLT+XEtwfURFaWeQaBM | |
SGbykg0ulEgq0F/vt6/lT0a5zp2K6uuj7yOXSrGlY3FQb0whzFux8Mmt3Dj6fKwN | |
G2oAkI8TxFrwxqOeEGw9yu1HDYb9qWk5CTxTKFloprwbjTIgYwhjrkUsfLYfeOb2 | |
cyBZ9TaVxJX2AfV5gn5YTUyUb+jgwrwx7eWaXQIDAQABAoIBAAc0wTnjPCLljFwr | |
B515MSfKCSi1FaMvVMz2lCGOQ+o5w+zweCaCuaPPyvhQcRArEa7+PSpdDyMftMoh | |
/LZy0btoCOZjcenngSNh/3gffI0cKdaNmbrDM+cAR2v6pk4oZMqVMe4qzZMADlCi | |
wSlEUjqzIoO05yuUUkmQDJ1L2JFgteuWxdLGsATycaht3fHai9dqAxazUh7Mu1dg | |
4xU7icGcD/5C5VdKR+R1GS8gW0k9DE2Xg/FtGIooXdFAY6QaqX5NsFAidx2dnbBf | |
cmtsKDxlksXKY2CJ/OkANM7gfuAqseu9GqfZbKczgbc1Q1H+QDNmrOPDdxB2w41J | |
UG6uXaECgYEA/EG+/8NyJh8/TLCqpyyX0ORMdHabJTdPR5hCgw6orNn3fZVdJe6Q | |
ZAcbyYOrwXBUPhoFbSFYMoA/DUr/4zWSD3aVIgpBoAHE3AKf+LMbUCazT91A/P/i | |
Jb1geswOzT9g5uk18oKv9vVyiXtKe3iD1KVZX+cnblfnw56/CxKI4rkCgYEA1OpO | |
izv/vV1B0LsRllKja9LWImhC26gnd0igbsQ0hRezCSzwnVihcxTcGJ77TbRMvBXK | |
urWZ8LjA2HU87XCCFDv+nYkVRtLPvnuN6MgEnmiX+bK3mmjDs8va4Zh7i9vq4EJ3 | |
xAehWJQpY28OAYCCHMWd8WlnIVNGmXBQqNj/MsUCgYBwpaN3b34ADCAmTRZIBR/e | |
hrSlpXluyx46KII7KEamucdNa2/nSntsT8hW2tfOUC0udkxKCYPrOV3uv7k5a2jI | |
Qvoh81aO73tLjFiHpOPjjQSx+2nUESiaFdGJxKovecf6FdajbzzJGZ6GSmpebNji | |
EtywePcgzVyP/MnvVd2O8QKBgDyb9n/sNIDTa0jf98GzBJJNEmf5Bg9Bbvql0gW2 | |
FL1OYcja4iPodw0rgvv/Rcp46N8h1PQRfiDodv0nYpC01lKsQW7W9xeSK1EuGteJ | |
GMd/PsP1/A4YhJ1KCqTtoz3M/K+aPD2xblyo0J9dnb8Ptfo6xxtRxenWquJC9rMa | |
EouBAoGBAJMRPqEfp9FItaeZF8QGL9hbf/emep88aWLTX67KdSvnYeTNtQigcKSa | |
ztZGai4RBFAXKqGq6KYDE/TQIOhhcxRLx9ZDbPoJkgvvvIDqw7mVA10E7vg45O0U | |
3mx/E3kwF3g1VcVNdrOtwRXERrRQvuLBOylvJAMB+NYRnMltUeQk | |
-----END RSA PRIVATE KEY----- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment