安装Nginx

11月 10, 2018

安装Nginx

A

1
sudo yum install epel-release

B

1
sudo yum install nginx

C

1
sudo systemctl start nginx

D

1
sudo systemctl enable nginx

代码配置参考

1
vi /etc/nginx/conf.d/proxy.conf
1
2
3
4
5
6
7
8
9
server {
listen 80;
server_name drone.weisd.in;

location / {
proxy_pass http://localhost:10081;
proxy_set_header Host $host:$server_port;
}
}

检查配置并重启

1
nginx -t && nginx -s reload