一:nginx yum源安装:
添加nginx的官方源 vim /etc/yum.repos.d/nginx.repo
[nginx-stable] name=nginx stable repo baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=1
enabled=1 gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true
[nginx-mainline]
name=nginx mainline repo baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
gpgcheck=1
enabled=0
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true
二: 下载nginx软件 yum -y install nginx
三:编写Nginx配置文件
vim /etc/nginx/conf.d/game.conf
server { listen 80; //添加一个没有被占用的端口
server_name game.nebula.com;
// windows 下 hosts