我想要一个解决方案来为我的 Nginx 配置 Odoo V15 SSL。
使用下面的配置,我有一个 bus.bus 错误,伴随着 erp.mydomain.fr 或 erp-society.mydomain.fr 之类的访问
我想从外部多次访问我的服务器。
等待你的答复
#odoo server
upstream odoo {
server 127.0.0.1:8069;
}
upstream odoochat {
server 127.0.0.1:8072;
}
## http redirects to https ##
server {
listen 80;
server_name *.mydomain.fr;
# Strict Transport Security
add_header Strict-Transport-Security max-age=2592000;
rewrite ^/.*$ https://$host$request_uri? permanent;
}
server {
listen 443 ssl;
server_name *.mydomain.fr;
proxy_read_timeout 720s;
proxy_connect_timeout 720s;
proxy_send_timeout 720s;
# Add Headers for odoo proxy mode
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
# proxy buffers
proxy_buffers 16 64k;
proxy_buffer_size 128k;
# SSL parameters
ssl_certificate /usr/local/etc/nginx/sites-enabled/server.crt;
ssl_certificate_key /usr/local/etc/nginx/sites-enabled/server.key;
ssl_session_timeout 30m;
ssl_protocols TLSv1.2;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
ssl_prefer_server_ciphers off;
# log
access_log /Users/Logs/odoo.access.log;
error_log /Users/Logs/odoo.error.log;
# Redirect longpoll requests to odoo longpolling port
location /longpolling {
proxy_pass http://odoochat;
}
# Redirect requests to odoo backend server
location / {
proxy_pass http://odoo;
proxy_redirect off;
}
location /web/static/ {
proxy_cache_valid 200 60m;
proxy_buffering on;
expires 864000;
proxy_pass http://odoo;
}
}
来自odoo的conf文件:
[options]
addons_path = /Users/xxxxx/Documents/Perso/Programmation/Odoo/15/odoo/addons,/Users/xxxxxxx/Documents/Perso/Programmation/Odoo/15/custom
csv_internal_sep = ,
data_dir = /Users/xxxxxxx/Library/Application Support/Odoo
db_host = localhost
db_maxconn = 256
db_name = xxxxxx
db_password = xxxxxxx
db_port = 5432
db_sslmode = prefer
db_template = template0
db_user = xxxxx
dbfilter = ^%d.*$
demo = {}
email_from = False
from_filter = False
geoip_database = /usr/share/GeoIP/GeoLite2-City.mmdb
http_enable = True
http_interface =
http_port = 8069
import_partial =
limit_memory_hard = 1677721600
limit_memory_soft = 629145600
limit_request = 8192
limit_time_cpu = 9999
limit_time_real = 9999
limit_time_real_cron = -1
list_db = True
log_db = False
log_db_level = warning
log_handler = :INFO
log_level = info
logfile =
longpolling_port = 8072
max_cron_threads = 2
osv_memory_age_limit = False
osv_memory_count_limit = False
pg_path =
pidfile =
proxy_mode = True
reportgz = False
screencasts =
server_wide_modules = base,web
smtp_password = False
smtp_port = 25
smtp_server = localhost
smtp_ssl = False
smtp_ssl_certificate_filename = False
smtp_ssl_private_key_filename = False
smtp_user = False
syslog = False
test_enable = False
test_file =
test_tags = None
transient_age_limit = 1.0
translate_modules = ['all']
unaccent = False
upgrade_path =
without_demo = False
workers = 4