nginx.conf.example 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # This is an configuration example. Please adjust to fit your environment (especially root location and server_name).
  2. # The nginx user requires read permissions to the root location.
  3. user nginx;
  4. worker_processes auto;
  5. error_log /var/log/nginx/error.log;
  6. pid /run/nginx.pid;
  7. # Load dynamic modules. See /usr/share/nginx/README.dynamic.
  8. include /usr/share/nginx/modules/*.conf;
  9. events {
  10. worker_connections 1024;
  11. }
  12. http {
  13. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  14. '$status $body_bytes_sent "$http_referer" '
  15. '"$http_user_agent" "$http_x_forwarded_for"';
  16. access_log /var/log/nginx/access.log main;
  17. sendfile on;
  18. tcp_nopush on;
  19. tcp_nodelay on;
  20. keepalive_timeout 65;
  21. types_hash_max_size 2048;
  22. include /etc/nginx/mime.types;
  23. default_type application/octet-stream;
  24. # Load modular configuration files from the /etc/nginx/conf.d directory.
  25. # See http://nginx.org/en/docs/ngx_core_module.html#include
  26. # for more information.
  27. include /etc/nginx/conf.d/*.conf;
  28. server {
  29. server_name your.domain;
  30. root /path/to/secret-snapdrop/client;
  31. # Load configuration files for the default server block.
  32. include /etc/nginx/default.d/*.conf;
  33. location /server {
  34. proxy_pass http://localhost:3000/;
  35. proxy_http_version 1.1;
  36. proxy_set_header Upgrade $http_upgrade;
  37. proxy_set_header Connection "upgrade";
  38. proxy_set_header X-Forwarded-For $remote_addr;
  39. }
  40. location / {
  41. proxy_http_version 1.1;
  42. }
  43. listen [::]:80 ;
  44. listen 80 ;
  45. }
  46. }