一:服务器配置文件的介绍


此配置文件有全局配置、events配置、http配置和server配置,


二:nginx的启动和和配置文件测试

其中./nginx -h可以查看帮助

-V: show version and configure options then exit显示版本和编译是的选项之后退出

-s signal:send signal to a master process: stop, quit, reopen, reload

-p prefix:set prefix path (default: /usr/local/nginx/)

-c filename:set configuration file (default: conf/nginx.conf)设置运行时候的配置文件可用于多实例运行比如:./nginx -c /nginx.conf -t 测试一个要运行的实例的配置文件


三:虚拟主机的配置

和Apache一样支持基于域名、端口、ip的虚拟主机


四:日志轮询

基于rotalog和cronolog的模式