我试图实现反向代理和工作者。它的工作正常,除非我在网址输入端口号我说'该网站无法访问'
192.168.50.15 Is working fine.
192.168.50.15:8069 it gives error ' This site can't be reached'
我该如何解决这个问题?
的/ etc / nginx的/位点可用/默认
#odoo server
upstream odoo {
server 127.0.0.1:8069;
}
upstream odoochat {
server 127.0.0.1:8072;
}
# http -> https server {
listen 80;
server_name 127.0.0.1:8069;
rewrite ^ (. *) https: // $ host $ 1 permanent;
}
server {
listen 443;
server_name 127.0.0.1:8069;
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;
# SSL parameters
ssl on;
ssl_certificate /etc/ssl/nginx/server.crt;
ssl_certificate_key /etc/ssl/nginx/server.key;
ssl_session_timeout 30m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers' ECDHE-RSA-AES128-GCM-SHA256: ECDHE-ECDSA-AES128-GCM-SHA256: ECDHE-RSA-AES256-GCM-SHA384: ECDHE-ECDSA-AES256-GCM-SHA384: DHE-RSA-AES128-GCM- SHA256: DHE-DSS-AES128-GCM-SHA256: kEDH + AESGCM: ECDHE-RSA-AES128-SHA256: ECDHE-ECDSA-AES128-SHA256: ECDHE-RSA-AES128-SHA: ECDHE-ECDSA-AES128-SHA: ECDHE- RSA-AES256-SHA384: ECDHE-ECDSA-AES256-SHA384: ECDHE-RSA-AES256-SHA: ECDHE-ECDSA-AES256-SHA: DHE-RSA-AES128-SHA256: DHE-RSA-AES128-SHA: DHE-DSS- AES128-SHA256: DHE-RSA-AES256-SHA256: DHE-DSS-AES256-SHA: DHE-RSA-AES256-SHA: AES128-GCM-SHA256: AES256-GCM-SHA384: AES128-SHA256: AES256-SHA256: AES128- SHA: AES256-SHA: AES: CAMELLIA: DES-CBC3-SHA :! ANULL :! ENULL :! EXPORT :! DES :! RC4 :! MD5 :! PSK :! AECDH :! EDH-DSS-DES-CBC3-SHA:! EDH-RSA-DES-CBC3-SHA :! KRB5-DES-CBC3-SHA ';
ssl_prefer_server_ciphers on;
# log
access_log /var/log/nginx/odoo.access.log;
error_log /var/log/nginx/odoo.error.log;
# Redirect requests to odoo backend server
location / {
proxy_redirect off;
proxy_pass http: // odoo;
}
location / longpolling {
proxy_pass http: // odoochat;
}
# common gzip
gzip_types text / css text / less text / plain text / xml application / xml application / json application / javascript;
gzip on;
}
odoo-server.conf中
[options]
; This is the password that allows database operations:
admin_passwd = admin
db_host = False
db_port = False
db_user = odoo
db_password = False
addons_path = /usr/lib/python2.7/dist-packages/odoo/addons
[options]
logfile = /var/log/odoo/odoo-server.log
addons_path = / odoo / odoo-server / addons
xmlrpc_port = 8069
proxy_mode = True
workers = 3
答案 0 :(得分:0)
终于得到了解决方案。
我在两个配置文件中用127.0.0.1
系统的IP地址替换了IP地址192.168.2.211
。