nginx.conf 896 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. user nginx;
  2. worker_processes 1;
  3. error_log /var/log/nginx/error.log warn;
  4. pid /var/run/nginx.pid;
  5. events {
  6. worker_connections 1024;
  7. }
  8. http {
  9. include /etc/nginx/mime.types;
  10. default_type application/octet-stream;
  11. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  12. '$status $body_bytes_sent "$http_referer" '
  13. '"$http_user_agent" "$http_x_forwarded_for"';
  14. access_log /var/log/nginx/access.log main;
  15. sendfile on;
  16. #tcp_nopush on;
  17. keepalive_timeout 65;
  18. #gzip on;
  19. server {
  20. listen 80;
  21. server_name localhost;
  22. location / {
  23. root /usr/share/nginx/html;
  24. index index.html index.htm;
  25. }
  26. error_page 500 502 503 504 /50x.html;
  27. location = /50x.html {
  28. root /usr/share/nginx/html;
  29. }
  30. }
  31. }