天波用户运营管理后台系统
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

57 rindas
1.4KB

  1. #user nobody;
  2. worker_processes 1;
  3. #error_log logs/error.log;
  4. #error_log logs/error.log notice;
  5. error_log /var/log/nginx/error.log warn;
  6. pid /var/run/nginx.pid;
  7. events {
  8. accept_mutex on; #设置网路连接序列化,防止惊群现象发生,默认为on
  9. multi_accept on; #设置一个进程是否同时接受多个网络连接,默认为off
  10. use epoll; #事件驱动模型,select|poll|kqueue|epoll|resig|/dev/poll|eventport
  11. worker_connections 1024;
  12. }
  13. http {
  14. include mime.types;
  15. default_type application/octet-stream;
  16. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  17. '$status $body_bytes_sent "$http_referer" '
  18. '"$http_user_agent" "$http_x_forwarded_for"';
  19. #access_log logs/access.log main;
  20. access_log /var/log/nginx/access.log main;
  21. sendfile on;
  22. #tcp_nopush on;
  23. #keepalive_timeout 0;
  24. keepalive_timeout 65;
  25. server {
  26. listen 80;
  27. server_name localhost;
  28. #charset koi8-r;
  29. charset utf-8;
  30. location / {
  31. root /app; # 指向目录
  32. index index.html;
  33. try_files $uri $uri/ /index.html;
  34. }
  35. error_page 500 502 503 504 /50x.html;
  36. location = /50x.html {
  37. root /usr/share/nginx/html;
  38. }
  39. }
  40. }