daily pastebin goal
67%
SHARE
TWEET

Untitled

a guest Feb 18th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. user www-data;
  2. worker_processes auto;
  3. pid /run/nginx.pid;
  4.  
  5. events {
  6.     worker_connections 768;
  7.     # multi_accept on;
  8. }
  9.  
  10. http {
  11.  
  12. ##
  13. # Basic Settings
  14. ##
  15.  
  16. sendfile on;
  17. tcp_nopush on;
  18. tcp_nodelay on;
  19. keepalive_timeout 65;
  20. types_hash_max_size 2048;
  21. include /etc/nginx/mime.types;
  22. default_type application/octet-stream;
  23.  
  24. include /etc/nginx/conf.d/*.conf;
  25. include /etc/nginx/sites-enabled/*;
  26. }
  27.    
  28. deleted
  29.    
  30. #odoo server
  31. upstream odoo {
  32. server 127.0.0.1:8069;
  33. }
  34.  
  35. # http -> https
  36. server {
  37. listen 80;
  38. server_name odoo.mycompany.com;
  39. rewrite ^(.*) https://$host$1 permanent;
  40. }
  41.  
  42. server {
  43. listen 443 ssl;
  44. server_name odoo.mycompany.com;
  45. proxy_read_timeout 720s;
  46. proxy_connect_timeout 720s;
  47. proxy_send_timeout 720s;
  48.  
  49. # Add Headers for odoo proxy mode
  50. proxy_set_header X-Forwarded-Host $host;
  51. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  52. proxy_set_header X-Forwarded-Proto $scheme;
  53. proxy_set_header X-Real-IP $remote_addr;
  54.  
  55. # SSL parameters
  56. ssl on;
  57. ssl_certificate /etc/nginx/ssl/odoo10.cert;
  58. ssl_certificate_key /etc/nginx/ssl/odoo10.key;
  59. ssl_session_timeout 30m;
  60. ssl_protocols TLSv1.2;
  61. ssl_ciphers HIGH:!aNULL:!MD5;
  62. ssl_prefer_server_ciphers on;
  63.  
  64. # log
  65. access_log /etc/nginx/odoo10.access.log;
  66. error_log /etc/nginx/odoo10.error.log debug;
  67.  
  68. # Redirect requests to odoo backend server
  69. location / {
  70. proxy_redirect off;
  71. proxy_pass http://odoo;
  72. }
  73.  
  74. # common gzip
  75. gzip_types text/css text/less text/plain text/xml application/xml
  76. application/json application/javascript;
  77. gzip on;
  78. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top