nginx配置本地調試

1.hosts綁定域名到ip(10.11.3.206)

         127.0.0.1  pyfisheyes.****.com

2.nginx配置

 

server {
       listen 80;
       server_name pyfisheyes.****.com;
       location / {
            proxy_pass http://127.0.0.1:5000;
            proxy_set_header  X-Real-IP  $remote_addr;

       }
       access_log /home/pyfisheyes/logs/pyfisheyes.access.log gzip;
    }


 

3.本地調試

curl -H "Host:pyfisheyes.****.com" http://10.11.3.206:5000 -I

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章