Skip to content
  • Categories
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse

Odoo 中文社区

  1. Home
  2. Categories
  3. Odoo 开发与实施交流
  4. [已解决]安装nginx后,在odoo中注销时,url上的端口号自动丢失

[已解决]安装nginx后,在odoo中注销时,url上的端口号自动丢失

Scheduled Pinned Locked Moved Odoo 开发与实施交流
2 Posts 1 Posters 1.8k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    eric2017
    wrote on last edited by eric2017
    #1

    nginx将8069端口转发给odoo的8091、8095端口。
    使用8069端口,能正常操作,除了在注销后。
    此时,端口号被自动去掉。只有手动输入
    http://localhost:8069/web/login
    才会正常。去掉login,或者去掉web/login都会自动删除端口号。

    这个问题,如何解决?

    系统:Ubuntu16.04
    odoo版本:10.0

    odoo的设置为:

    xmlrpc_port = 8091
    longpolling_port = 8095
    

    nginx的default中的80全部改为81,并去掉default_server

    server {
    	listen 81;
    	listen [::]:81;
    

    新添加设置odoo,内容为:

    server{
                listen 8069 default_server;
                #listen [::]:8069 default_server;
                server_name  odoo10;
                location / {
                            proxy_pass http://0.0.0.0:8091;
                            proxy_redirect    off;
                            proxy_set_header Host $host;
                            proxy_set_header X-Real-IP  $remote_addr;
                            proxy_set_header X-Forwarded-For  $proxy_add_x_forwarded_for;
                }
                location /longpolling/ {
                            proxy_pass        http://localhost:8095/longpolling/;
                            proxy_redirect    off;
                            proxy_set_header Host $host;
                            proxy_set_header X-Real-IP $remote_addr;
                            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                }
    
    }
    
    1 Reply Last reply
    0
    • E Offline
      E Offline
      eric2017
      wrote on last edited by
      #2

      非常感谢!
      在您的指导下,已顺利解决该问题

      1 Reply Last reply
      0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Tags
      • Popular
      • Users
      • Groups