You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
1.6 KiB

  1. user root;
  2. worker_processes 1;
  3. #error_log logs/error.log;
  4. #error_log logs/error.log notice;
  5. #error_log logs/error.log info;
  6. pid /var/run/nginx.pid;
  7. events {
  8. worker_connections 1024;
  9. }
  10. http {
  11. include mime.types;
  12. default_type application/octet-stream;
  13. sendfile on;
  14. keepalive_timeout 0;
  15. client_body_buffer_size 10K;
  16. client_header_buffer_size 1k;
  17. client_max_body_size 1G;
  18. large_client_header_buffers 2 1k;
  19. gzip on;
  20. gzip_http_version 1.1;
  21. gzip_vary on;
  22. gzip_comp_level 1;
  23. gzip_proxied any;
  24. gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript image/svg+xml;
  25. root /www;
  26. server {
  27. listen 80 default_server;
  28. listen [::]:80 default_server;
  29. server_name _;
  30. return 301 https://$host$request_uri;
  31. }
  32. server {
  33. listen 443 ssl default_server;
  34. listen [::]:443 ssl default_server;
  35. server_name localhost;
  36. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  37. ssl_prefer_server_ciphers on;
  38. ssl_ciphers "EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH:DHE+AESGCM:DHE:!RSA!aNULL:!eNULL:!LOW:!RC4:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!CAMELLIA:!SEED";
  39. ssl_session_tickets off;
  40. ssl_certificate /etc/nginx/nginx.cer;
  41. ssl_certificate_key /etc/nginx/nginx.key;
  42. location ~* .(jpg|jpeg|png|gif|ico|css|js)$ {
  43. expires 365d;
  44. }
  45. include luci_uwsgi.conf;
  46. }
  47. include /etc/nginx/conf.d/*.conf;
  48. }