A
A
avdoshka2019-09-15 09:36:28
Nginx
avdoshka, 2019-09-15 09:36:28

How to fix nginx HTTP redirect issue?

I mean the site works fine on https://staging.promateworld.com
It doesn't load on staging.promateworld.com
Welcome to Nginx!
If you see this page, the nginx web server is successfully installed and running. Further tweaking...
Promateworld
This is an nginx redirect issue, right?
After switching to https. redirect to HTTP does not work.
how to fix this problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
ky0, 2019-09-15
@ky0

This is a configuration issue. Usually they make an unconditional redirect to the HTTPS version.

server {
        listen 80;
        server_name  staging.promateworld.com;

        location / {
        return 301 https://$host$request_uri;
        }

}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question