Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
6158 Lượt xem

This is closely related to the question here:

https://www.odoo.com/forum/help-1/question/howto-use-https-and-odoo-subfolder-with-odoo-12-official-docker-image-151737

In fact it is identical, except that I am not using docker, but have installed odoo using the debian repository. I would have just commented on the previous issue but I don't have enough karma as a new user.

However, to repeat what was said in that query, I want to access my odoo instance at an address like

https://<my ip>/odoo and https://<my subdomain>/odoo

I'd like to know two things:

 1.   What needs to be done with the Apache2 webserver proxy configurationso that requests to the above URLs with subfolder are correctly processed by Odoo?

 2.   What needs to be done so that the reverse proxy can work as HTTPS endpoint and forward the requests to the Odoo container?


I tried changing proxy_mode = True in /etc/odoo/odoo.conf and the following configuration file for apache (put in /etc/apache2/sites-available/odoo.conf and activated with a2ensite):

<Proxy *>
     Order allow,deny
     Allow from all
</Proxy>
#
ProxyPass /odoo http://localhost:8069
ProxyPassReverse /odoo http://localhost:8069

I have tried several variations on this with no success. With the above config, the address seems to get redirected from https://<my domain>/odoo to https://<my domain>/web and I get a 404 not found error.


I also now tried this:


<Location /odoo>

  ProxyPass http://localhost:8069 retry=0

  # retry=0 => avoid 503's when restarting etherpad-lite

  ProxyPassReverse http://localhost:8069

  SetOutputFilter proxy-html

  ProxyHTMLURLMap http://localhost:8069

</Location>

RewriteRule ^/odoo$ /odoo/ [R]


Based on


https://serverfault.com/questions/561892/how-to-handle-relative-urls-correctly-with-a-reverse-proxy/561897


bit I still get redirected to /web and get a 404

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

I ended up just using a subdomain, and adding a redirect from /odoo to https://odoo.mywebsite.com/ doesn't seem to be possible to have a subfolder due to reasons deep in the odoo code.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 6 20
9510
3
thg 6 25
1752
2
thg 12 23
14633
0
thg 10 23
33
3
thg 10 23
788