Created
December 23, 2016 10:40
-
-
Save mackwic/cf889a5d393bdca1dfcbb3e420b41139 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
root@ubuntu-xenial:~# curl yolo.sgmap.fr | |
poney | |
root@ubuntu-xenial:~# curl yolo.sgmap.fr/api | |
mangez des brocolis | |
root@ubuntu-xenial:~# curl -k --tlsv1.0 https://test.sgmap.fr | |
poney | |
root@ubuntu-xenial:~# curl -k --tlsv1.0 https://test.sgmap.fr/api | |
<html> | |
<head><title>400 Bad Request</title></head> | |
<body bgcolor="white"> | |
<center><h1>400 Bad Request</h1></center> | |
<hr><center>nginx/1.10.0 (Ubuntu)</center> | |
</body> | |
</html> | |
root@ubuntu-xenial:~# curl -k --tlsv1.2 https://test.sgmap.fr/api | |
mangez des brocolis |
This file contains hidden or 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
server { | |
listen 80; | |
server_name yolo.sgmap.fr; | |
error_log /tmp/nginx.yolo.tml debug; | |
location / { | |
return 200 'poney\n'; | |
location /api { | |
return 200 'mangez des brocolis\n'; | |
} | |
} | |
} | |
server { | |
listen 443 ssl; | |
server_name test.sgmap.fr; | |
error_log /tmp/nginx.log debug; | |
location / { | |
proxy_pass http://yolo.sgmap.fr; | |
location /api { | |
if ($ssl_protocol = "TLSv1.1") { | |
set $outdated_tls "outdated_tls"; | |
return 400; | |
} | |
if ($ssl_protocol = "TLSv1") { | |
set $outdated_tls "outdated_tls"; | |
return 400; | |
} | |
proxy_pass http://yolo.sgmap.fr/api; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment