• 安装nginx服务器​​yun install nginx​
  • 启动nginx​​nginx start​
  • 查看配置文件​​nginx -h​
-?,-h         : this help
-v : show version and exit
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
-V : show version and configure options then exit
-t : test configuration and exit

-T : test configuration, dump it and exit
-q : suppress non-error messages during configuration testing
fifdsafdsa
-s signal : send signal to a master process: stop, quit, reopen, reload
-p prefix : set prefix path (default: /usr/share/nginx/)
-c filename : set configuration file (default: /etc/nginx/nginx.conf)
-g directives : set global directives out of

使用nginx搭建静态资源服务器_nginx

  • 修改配置, 设置root默认静态资源路径​​/home/xxx/static​​,但是访问403
  • 修改user 为root
  • 使用nginx搭建静态资源服务器_nginx_02

  • 重启nginx服务​​nginx -s reload​