2016-12-27 41 views
0

我正在開發一個網站,並且我剛剛在生產網站上安裝了ssl(我從來沒有這樣做過)。當我加載開發網站時,由於https未安裝在開發站點上,因此頁面重定向到https並中斷。在開發服務器上,主機文件和nginx從http重定向到https

Nginx的(生產):

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; 
} 

Nginx的(發展):

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; 
    } 

} 

在我的機器,我也有我的hosts文件如下:

127.0.0.1 local.ezel.io 

什麼會是導致我去從http://local.ezel.iohttps://local.ezel.io

example

回答

相關問題