nginx used on the windows

Daniel's blog: https://blog.csdn.net/xiaojin21cen/article/details/84622517#2_37

There are very detailed description.

Then modify with local host

127.0.0.1 www.oe.com
127.0.0.1 wiki.oe.com

Configuring nginx

worker_processes  1;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;

    sendfile        on;

    keepalive_timeout  65;


    server {
        listen       80;
		server_name  wiki.oe.com;

        keepalive_timeout  120;

        client_max_body_size 50m;
		location /{
			proxy_http_version  1.1;
			proxy_connect_timeout 1;
			proxy_send_timeout 30;
			proxy_read_timeout 60;
			proxy_set_header Upgrade $http_upgrade;
			proxy_set_header Connection "upgrade";
			proxy_set_header Host $http_host;
			proxy_set_header X-Forwarded-Host $http_host;
			proxy_set_header X-Real-IP $remote_addr;
			proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
			proxy_set_header Origin '';
			proxy_pass http://127.0.0.1:8090;
		}
    }
}

So basically this machine will be able to simulate all of the development environment, and for https, you can use a self-signed certificate.

He published 183 original articles · won praise 37 · views 160 000 +

Guess you like

Origin blog.csdn.net/zhuwei_clark/article/details/104847212