프록시로는 가게 만들고싶은데, url은 유지하고 싶어 !!!!!
However, if this field is not present in a client request header then nothing will be passed. In such a case it is better to use the $host variable - its value equals the server name in the “Host” request header field or the primary server name if this field is not present:
proxy_set_header Host $host;
conf.d 밑에다가 넣을 것
location / {} 추가
설정은 공식문서 참조하면 설명이 나와있더라... 굿!
server {
listen 443;
server_name domain_name;
ssl on;
ssl_certificate path/crt;
ssl_certificate_key path/key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:MEDIUM:!SSLv2:!PSK:!SRP:!ADH:!AECDH;
ssl_prefer_server_ciphers on;
location / {
proxy_pass target_server_name;
proxy_http_version 1.1;
proxy_cache_bypass $http_upgrade;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
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-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Prot $server_port;
}
error_page 500 502 504 504 /50x.html;
...
}