https 로 리디렉션 되는 것을 중지하고 http:로 변경하는 방법을 알고 싶습니다.

0

현재 https로 계속 리디렉션이 되며, http로 표기가 안되는데, 로드밸런싱에서 비활성화를 시켜도 https로 리디렉션이 됩니다. 해결법을 부탁드립니다.

alan e
gefragt vor 5 Monaten319 Aufrufe
1 Antwort
1

안녕하세요 alan e 님,

자세한 정보가 부족하여 정확한 원인은 알 수 없으나, 사용하시는 웹서버의 설정에 따라 차이가 있을 수 있습니다.
아래는 Nginx 에서 redirection 설정 부분에 대한 예제이니 참고하시면 도움이 될 것 같습니다.

$ curl -I http://example.com
HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Sun, 10 Dec 2023 12:03:03 GMT
Content-Type: text/html
Content-Length: 162
Connection: keep-alive
Location: https://www.example.com/  ###<<---!!  redirection https

아래와 같이 Nginx 설정에서 redirection 을 하는 설정이 되어있는지 확인이 필요합니다.

server {
    listen      80 ;
    server_name  www.example.com example.com;
    server_tokens off;

    location / {
        return 301 https://www.example.com$uri;    ##<<--!!
...

server {
    listen      443 ssl ;
...
    location / {
	root /var/www/html/;
        index index.html;
    }
...

이 답변이 해결에 도움이 되었다면 커뮤니티 발전을 위해 답변의 승인을 부탁 드립니다.
감사합니다.

참고 문서

[+] https://www.lesstif.com/system-admin/nginx-http-https-force-redirect-to-ssl-113344694.html

profile pictureAWS
SUPPORT-TECHNIKER
beantwortet vor 5 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen