Advertisement
Guest User

Untitled

a guest
May 31st, 2016
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.43 KB | None | 0 0
  1. upstream odoo8 {
  2.  
  3. server 127.0.0.1:8069 weight=1 fail_timeout=0;
  4.  
  5. }
  6.  
  7. upstream odoo8-im {
  8.  
  9. server 127.0.0.1:8072 weight=1 fail_timeout=0;
  10.  
  11. }
  12.  
  13. server {
  14.  
  15. listen 80;
  16.  
  17. server_name 138.201.xx.xx;
  18.  
  19. access_log /var/log/nginx/odoo.access.log;
  20.  
  21. error_log /var/log/nginx/odoo.error.log;
  22.  
  23. location /longpolling {
  24.  
  25. proxy_pass http://odoo8-im;
  26.  
  27. proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
  28.  
  29. proxy_redirect off;
  30.  
  31. # set headers
  32.  
  33. proxy_set_header Host $host;
  34.  
  35. proxy_set_header X-Real-IP $remote_addr;
  36.  
  37. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  38.  
  39. proxy_set_header X-Forwarded-Proto https;
  40.  
  41. proxy_connect_timeout 600;
  42.  
  43. proxy_send_timeout 600;
  44.  
  45. proxy_read_timeout 600;
  46.  
  47. send_timeout 600;
  48.  
  49. }
  50.  
  51. location / {
  52.  
  53. proxy_pass http://odoo8;
  54.  
  55. proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
  56.  
  57. proxy_buffer_size 128k;
  58.  
  59. proxy_buffers 16 64k;
  60.  
  61. proxy_redirect off;
  62.  
  63. proxy_set_header Host $host;
  64.  
  65. proxy_set_header X-Real-IP $remote_addr;
  66.  
  67. # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  68.  
  69. # proxy_set_header X-Forwarded-Proto https;
  70.  
  71. proxy_connect_timeout 600;
  72.  
  73. proxy_send_timeout 600;
  74.  
  75. proxy_read_timeout 600;
  76.  
  77. send_timeout 600;
  78.  
  79. }
  80.  
  81. location ~* /web/static/ {
  82.  
  83. proxy_buffering on;
  84. proxy_pass 127.0.0.1:8069;
  85.  
  86. }
  87.  
  88. }
  89.  
  90. ; This is the password that allows database operations:
  91.  
  92. ; admin_passwd = admin
  93.  
  94. db_host = False
  95.  
  96. db_port = False
  97.  
  98. db_user = odoo
  99.  
  100. db_password = odoo
  101.  
  102. addons_path = /opt/odoo/addons,/opt/odoo/addons/sale-workflow-8.0,/opt/odoo/addons/product-attribute-8.0,/opt/odoo/addons/e-commerce-8.0,/opt/odoo/addons/connector-magento-8.0,/opt/odoo/addons/connector-ecommerce-8.0,/opt/odoo/addons/connector-8.0
  103.  
  104. logfile = /var/log/odoo/odoo-server.log
  105.  
  106. workers = 12
  107.  
  108. limit_time_real = 600
  109.  
  110. limit_time_cpu = 300
  111.  
  112. #!/bin/sh
  113.  
  114. ### BEGIN INIT INFO
  115.  
  116. # Provides: odoo-server
  117.  
  118. # Required-Start: $remote_fs $syslog
  119.  
  120. # Required-Stop: $remote_fs $syslog
  121.  
  122. # Should-Start: $network
  123.  
  124. # Should-Stop: $network
  125.  
  126. # Default-Start: 2 3 4 5
  127.  
  128. # Default-Stop: 0 1 6
  129.  
  130. # Short-Description: Complete Business Application software
  131.  
  132. # Description: Odoo is a complete suite of business tools.
  133.  
  134. ### END INIT INFO
  135.  
  136. PATH=/usr/local/bin:/bin:/sbin:/usr/bin
  137.  
  138. DAEMON=/opt/odoo/openerp-server
  139.  
  140. NAME=odoo-server
  141.  
  142. DESC=odoo-server
  143.  
  144. ODOO_CONNECTOR_CHANNELS=root:4,root.magento:2
  145.  
  146. # Specify the user name (Default: odoo).
  147.  
  148. USER=odoo
  149.  
  150. # Specify an alternate config file (Default: /etc/odoo-server.conf).
  151.  
  152. CONFIGFILE="/etc/odoo-server.conf"
  153.  
  154. # pidfile
  155.  
  156. PIDFILE=/var/run/$NAME.pid
  157.  
  158. # Additional options that are passed to the Daemon.
  159.  
  160. DAEMON_OPTS="-c $CONFIGFILE"
  161.  
  162. [ -x $DAEMON ] || exit 0
  163.  
  164. [ -f $CONFIGFILE ] || exit 0
  165.  
  166. checkpid() {
  167.  
  168. [ -f $PIDFILE ] || return 1
  169.  
  170. pid=`cat $PIDFILE`
  171.  
  172. [ -d /proc/$pid ] && return 0
  173.  
  174. return 1
  175.  
  176. }
  177.  
  178. case "${1}" in
  179. start)
  180.  
  181. echo -n "Starting ${DESC}: "
  182.  
  183. start-stop-daemon --start --quiet --pidfile ${PIDFILE}
  184.  
  185. --chuid ${USER} --background --make-pidfile
  186.  
  187. --exec ${DAEMON} -- ${DAEMON_OPTS}
  188.  
  189. echo "${NAME}."
  190.  
  191. ;;
  192.  
  193. stop)
  194.  
  195. echo -n "Stopping ${DESC}: "
  196.  
  197. start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
  198.  
  199. --oknodo
  200.  
  201. echo "${NAME}."
  202.  
  203. ;;
  204.  
  205. restart|force-reload)
  206.  
  207. echo -n "Restarting ${DESC}: "
  208.  
  209. start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
  210.  
  211. --oknodo
  212.  
  213. sleep 1
  214.  
  215. start-stop-daemon --start --quiet --pidfile ${PIDFILE}
  216.  
  217. --chuid ${USER} --background --make-pidfile
  218.  
  219. --exec ${DAEMON} -- ${DAEMON_OPTS}
  220.  
  221. echo "${NAME}."
  222.  
  223. ;;
  224.  
  225. *)
  226.  
  227. N=/etc/init.d/${NAME}
  228.  
  229. echo "Usage: ${NAME} {start|stop|restart|force-reload}" >&2
  230.  
  231. exit 1
  232.  
  233. ;;
  234.  
  235. esac
  236.  
  237. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement