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

I'm using openerp version 7 and nginx as a reverse proxy, I can access openerp when typing in the url my_domain_name, but I can also access it when typing my_ip_adress: 8069

Here's my nginx file:

upstream openerpweb {

server 127.0.0.1:8069 weight=1 fail_timeout=300s;

}

server {

listen 80 ;

#add_header Strict-Transport-Security max-age=2592000;

#rewrite ^/.*$ https://$host$request_uri? permanent;

}

server {

listen 443 default;

server_name  my_domain_name;

client_max_body_size 200m;

access_log /var/log/nginx/openerp-access.log;

error_log /var/log/nginx/openerp-error.log;

# ssl certificate files

ssl on;

ssl_certificate /etc/nginx/ssl/certificate.crt;

ssl_certificate_key /etc/nginx/ssl/private/server.key;

# add ssl specific settings

keepalive_timeout 60;

# limit ciphers

ssl_ciphers HIGH:!ADH:!MD5;

ssl_protocols SSLv3 TLSv1;

ssl_prefer_server_ciphers on;

# increase proxy buffer to handle some OpenERP web requests

proxy_buffers 16 64k;

proxy_buffer_size 128k;

location / {

proxy_pass http://openerpweb;

# force timeouts if the backend dies

proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;

# by default, do not forward anything

proxy_redirect off;

}

# cache some static data in memory for 60mins.

# under heavy load this should relieve stress on the OpenERP web interface a bit.

location ~* /web/static/ {

proxy_cache_valid 200 60m;

proxy_buffering on;

expires 864000;

proxy_pass http://openerpweb;

}


What should I do to only access openerp via domain?

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

Openerp is running on port 8069.What we do using nginx is to redirect http and https request to 8069.

So if you give permission for public to access port 8069 of your instance, then you will be able to access odoo using my_ip_adress: 8069.

If you don't want this you should close access to 8069 of your instance(For security reasons, its better to close 8069)

Ảnh đại diện
Huỷ bỏ
Tác giả

Yes, I closed port 8069 and that works. Thanks a lot.

Câu trả lời hay nhất

probably answered somewhere already, but this came up in google

basically you add this to odoo.conf and then restart the service

as per the CLI HTTP developer reference

--http-interface<interface>

TCP/IP address on which the HTTP server listens, defaults to 0.0.0.0 (all addresses)

http_interface = 127.0.0.1
Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi, I have the same issue and need to close port 8069. How can be done on Nginx? 

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 8 24
3910
0
thg 10 20
3182
3
thg 12 19
21994
2
thg 3 15
10412
1
thg 11 22
4099