Nginx configuration proxy server

Modify the configuration nginx.conf

worker_processes  1;

events {
    worker_connections  1024;
}

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

    sendfile        on;
    keepalive_timeout       65;
    client_max_body_size    8M;
    client_body_buffer_size 128k;


    # dns
    resolver  8.8.8.8;

    server {
       listen 8888;
       location / {
           proxy_pass http://$http_host$request_uri;
       }
    }
}

Which resolver 8.8.8.8;are using the Google dns, need to be replaced if necessary.

Set the Nginx server IP and the above port 8888 on the client to connect to the network through the proxy server.

Published 420 original articles · 143 thumbs up · 890,000 views

Guess you like

Origin blog.csdn.net/jeikerxiao/article/details/100576470