Skip to content

20191204在服务器上安装nginx

ziyouzy edited this page Dec 4, 2019 · 5 revisions

狗肉亭教程【99:01开始】:

1.apt-get update

2.apt install nginx

3.配置端口转移至对应容器端口

cd /etc/nginx/sites-enabled

vi gourouting.conf

server {

listen 80:

location / //mybed/{

proxy_set_header X-Real-IP $remote_addr;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

}

}

service nginx restart(配置生效)

nginx -t(验证刚刚些的配置是否有错误)

test2

Clone this wiki locally