Advertisement
Vsevolod_Terentev

nginx.conf

Feb 20th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. user nginx;
  2. worker_processes 1;
  3.  
  4. error_log /var/log/nginx/error.log warn;
  5. pid /var/run/nginx.pid;
  6.  
  7.  
  8. events {
  9. worker_connections 1024;
  10. }
  11.  
  12.  
  13. http {
  14. include /etc/nginx/mime.types;
  15. include /etc/nginx/conf.d/*.conf;
  16. include /etc/nginx/SITES-conf/mysite-local.conf;
  17. include /etc/nginx/SITES-conf/testhost.conf;
  18. include /etc/nginx/SITES-conf/website.conf;
  19. include /etc/nginx/SITES-conf/network.conf;
  20. include /etc/nginx/SITES-conf/static.conf;
  21. default_type application/octet-stream;
  22.  
  23. add_header X-XSS-Protection "1; mode=block";
  24. add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload';
  25. add_header X-Frame-Options "DENY";
  26.  
  27. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  28. '$status $body_bytes_sent "$http_referer" '
  29. '"$http_user_agent" "$http_x_forwarded_for"';
  30.  
  31. access_log /var/log/nginx/access.log main;
  32.  
  33. sendfile on;
  34. #tcp_nopush on;
  35.  
  36. keepalive_timeout 65;
  37.  
  38. #gzip on;
  39.  
  40. upstream backend {
  41. server testhost.ru:81 weight=1;
  42. server mysite.local:82 weight=2;
  43. server website.ru:83 weight=3;
  44. server network.ru:84 weight=4;
  45. server static.ru:85 weight=5;
  46. }
  47.  
  48. server {
  49. listen 8080;
  50. server_name net.io;
  51.  
  52. add_header X-Content-Type-Options nosniff;
  53. # add_header Content-Security-Policy "default-src 'self';";
  54.  
  55. location / {
  56. proxy_pass http://backend;
  57. }
  58. }
  59.  
  60.  
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement