Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1506

Hosts file and nginx redirect from http to https on development server

$
0
0

I am developing a website, and I just installed ssl on the production website (I have never done this before). When I load the development website the page redirects to https and breaks because https isn't installed on the development site.

The Nginx (production):

server{        listen 80;        server_name ezel.io;        root /var/www/ezel.io/public;        location ~ /.well-known {                allow all;        }        rewrite ^ https://$server_name$request_uri? permanent;}

The Nginx (development):

server {    listen          80;    server_name     local.ezel.io;    root            /home/ryan/Documents/www/ezel.io/public;    index           index.php index.html index.htm;    location / {        try_files $uri $uri/ /index.php?$query_string;    }    location ~ \.php$ {        fastcgi_pass unix:/run/php/php7.0-fpm.sock;        fastcgi_index  index.php;        fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;        include fastcgi_params;    }}

On my development machine, I also have the following in my hosts file:

127.0.0.1 local.ezel.io

What would be causing me to go from http://local.ezel.io to https://local.ezel.io?

example


Viewing all articles
Browse latest Browse all 1506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>