Nginx初尝试与教程,Nginx尝试教程


安装

下载地址:http://nginx.org/en/download.html

下载解压到 D:nginx/

CMD运行命令:

D:
cd nginx
start nginx

Nginx基础命令

查看nginx的版本号:nginx -v
验证配置是否正确: nginx -t
启动命令:start nginx
快速停止命令:nginx -s stop
正常停止命令:nginx -s quit
配置文件修改重载命令:nginx -s reload

配置

打开 conf 目录下的 nginx.conf 文件,并进行配置

// 最简单的反向代理 node 地址 http://localhost:8081;
server {
	listen	80;
	server_name localhost;
	location / {
		proxy_pass http://localhost:8081;
	}
}

教程

前端必会的 Nginx入门文字与视频教程(共11集)

相关内容

    暂无相关文章