SSL安装403之后没有显示任何图像(禁止)



在Apache 2.4上安装Odoo 11。当访问本地地址时,一切正常,

整个映像都已加载,但当我配置反向代理+ssl时,当加载域时

一切正常,只要你去有图像的部分,就会有很多

浏览器中的错误

GEThttps://url/web/image?model=res.partner&field=image_small&id=82&unique=403(禁止(

GEThttps://url/web/image?model=res.partner&field=image_small&id=60&unique=403(禁止(

GEThttps://url/web/image?model=res.partner&field=image_small&id=58&unique=403(禁止(

并且图像数据在尝试更新站点时没有出现;禁言;页面崩溃,

网站在几分钟后关闭,它重新启动,我尝试了一切我找不到的决定。

日志Odo_server:

2020-09-14 06:17:39,493 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:17:39] "POST /longpolling/poll HTTP/1.1" 200 -
2020-09-14 06:17:39,682 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:17:39] "POST /web/dataset/call_kw/mail.channel/channel_seen HTTP/1.1" 200 -
2020-09-14 06:17:39,687 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:17:39] "POST /longpolling/poll HTTP/1.1" 200 -
2020-09-14 06:17:43,348 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:17:43] "POST /web/webclient/translations HTTP/1.1" 200 -
2020-09-14 06:17:43,494 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:17:43] "POST /longpolling/poll HTTP/1.1" 200 -
2020-09-14 06:17:43,495 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:17:43] "POST /longpolling/poll HTTP/1.1" 200 -
2020-09-14 06:17:43,496 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:17:43] "POST /longpolling/poll HTTP/1.1" 200 -
2020-09-14 06:17:43,497 31527 INFO dbtest1 werkzeug: 93.77.82.252 - - [14/Sep/2020 06:17:43] "POST /longpolling/poll HTTP/1.1" 200 -
2020-09-14 06:17:43,498 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:17:43] "POST /web/dataset/call_kw/mail.channel/channel_join_and_get_info HTTP/1.1" 200 -
2020-09-14 06:17:43,500 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:17:43] "POST /longpolling/poll HTTP/1.1" 200 -
2020-09-14 06:17:43,501 31527 INFO dbtest1 werkzeug: 178.150.235.68 - - [14/Sep/2020 06:17:43] "POST /longpolling/poll HTTP/1.1" 200 -
2020-09-14 06:17:43,501 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:17:43] "POST /longpolling/poll HTTP/1.1" 200 -
2020-09-14 06:17:43,503 31527 INFO dbtest1 werkzeug: 178.150.235.68 - - [14/Sep/2020 06:17:43] "POST /longpolling/poll HTTP/1.1" 200 -
2020-09-14 06:17:45,621 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:17:45] "POST /mail/client_action HTTP/1.1" 200 -
2020-09-14 06:17:45,987 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:17:45] "POST /web/dataset/call_kw/res.users/activity_user_count HTTP/1.1" 200 -
2020-09-14 06:17:46,722 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:17:46] "POST /longpolling/poll HTTP/1.1" 200 -
2020-09-14 06:17:46,765 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:17:46] "POST /calendar/notify HTTP/1.1" 200 -
2020-09-14 06:17:46,815 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:17:46] "POST /web/action/load HTTP/1.1" 200 -
2020-09-14 06:17:47,004 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:17:47] "GET /web/image?model=res.users&field=image_small&id=8 HTTP/1.1" 200 -
2020-09-14 06:17:48,253 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:17:48] "POST /web/dataset/call_kw/project.task/load_views HTTP/1.1" 200 -
2020-09-14 06:17:50,358 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:17:50] "POST /web/dataset/call_kw/project.project/name_get HTTP/1.1" 200 -
2020-09-14 06:17:51,211 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:17:51] "POST /web/dataset/call_kw/project.task/read HTTP/1.1" 200 -
2020-09-14 06:17:52,787 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:17:52] "POST /web/dataset/call_kw/project.task.type/search_read HTTP/1.1" 200 -
2020-09-14 06:17:53,701 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:17:53] "POST /web/dataset/call_kw/project.task.type/name_get HTTP/1.1" 200 -
2020-09-14 06:17:55,243 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:17:55] "POST /web/dataset/call_kw/project.task/pad_is_configured HTTP/1.1" 200 -
2020-09-14 06:17:55,403 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:17:55] "POST /mail/read_followers HTTP/1.1" 200 -
2020-09-14 06:17:55,494 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:17:55] "POST /web/dataset/call_kw/mail.message/message_format HTTP/1.1" 200 -
2020-09-14 06:17:56,225 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:17:56] "POST /web/dataset/call_kw/ir.attachment/search_read HTTP/1.1" 200 -
2020-09-14 06:18:01,559 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - 
[14/Sep/2020 06:18:01] "GET /web/image/res.partner/7/image_small HTTP/1.1" 200 -
2020-09-14 06:18:01,586 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:01] "GET /web/image/res.partner/11/image_small HTTP/1.1" 200 -
2020-09-14 06:18:01,666 31527 INFO dbtest1 odoo.addons.base.ir.ir_cron: Starting job `Helpdesk Tickets Update`.
2020-09-14 06:18:01,674 31527 INFO dbtest1 odoo.addons.base.ir.ir_cron: Job `Helpdesk Tickets Update` done.
2020-09-14 06:18:01,675 31527 INFO dbtest1 odoo.addons.base.ir.ir_cron: Starting job `Mail: Email Queue Manager`.
2020-09-14 06:18:01,682 31527 INFO dbtest1 odoo.addons.base.ir.ir_cron: Job `Mail: Email Queue Manager` done.
2020-09-14 06:18:02,177 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - 
[14/Sep/2020 06:18:02] "GET /web/image/res.partner/9/image_small HTTP/1.1" 200 -
2020-09-14 06:18:02,180 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:02] "GET /web/image/res.partner/6/image_small HTTP/1.1" 200 -
2020-09-14 06:18:02,181 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:02] "GET /web/image/res.partner/77/image_small HTTP/1.1" 200 -
2020-09-14 06:18:05,882 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:05] "GET /web HTTP/1.1" 200 -
2020-09-14 06:18:07,355 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:07] "GET /web/webclient/qweb?mods=web,base,bus,web_tour,mail,sales_team,calendar,web_planner,contacts,crm,product,portal,project,barcodes,stock,mrp,account,sale,account_invoicing,sale_management,hr,hr_timesheet,hr_holidays,account_asset,hr_payroll,web_editor,website,purchase,hr_attendance,document,hr_recruitment,hr_expense,account_bank_statement_import,auth_signup,base_import,board,helpdesk_lite,hr_org_chart,iap,pad,payment,payment_transfer,rating,sale_stock,sale_timesheet,sms,web_diagram,web_kanban_gauge,web_settings_dashboard,im_livechat,website_livechat,website_mail,website_partner,website_rating,website_theme_install,maintenance,website_blog HTTP/1.1" 200 -
2020-09-14 06:18:07,636 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:07] "POST /web/dataset/call HTTP/1.1" 200 -
2020-09-14 06:18:07,824 31527 INFO ? werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:07] "GET /web/static/src/img/favicon.ico HTTP/1.1" 200 -
2020-09-14 06:18:08,680 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:08] "POST /web/webclient/translations HTTP/1.1" 200 -
2020-09-14 06:18:09,848 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:09] "POST /web/dataset/call_kw/res.users/activity_user_count HTTP/1.1" 200 -
2020-09-14 06:18:09,872 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:09] "POST /mail/client_action HTTP/1.1" 200 -
2020-09-14 06:18:09,898 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:09] "POST /calendar/notify HTTP/1.1" 200 -
2020-09-14 06:18:09,903 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:09] "GET /web/image?model=res.users&field=image_small&id=8 HTTP/1.1" 304 -
2020-09-14 06:18:09,910 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:09] "POST /web/action/load HTTP/1.1" 200 -
2020-09-14 06:18:10,255 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:10] "POST /web/dataset/call_kw/project.task/load_views HTTP/1.1" 200 -
2020-09-14 06:18:11,531 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:11] "POST /web/dataset/call_kw/project.project/name_get HTTP/1.1" 200 -
2020-09-14 06:18:11,843 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:11] "POST /web/dataset/call_kw/project.task/read HTTP/1.1" 200 -
2020-09-14 06:18:12,148 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:12] "POST /web/dataset/call_kw/project.task.type/search_read HTTP/1.1" 200 -
2020-09-14 06:18:12,368 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:12] "POST /web/dataset/call_kw/project.task.type/name_get HTTP/1.1" 200 -
2020-09-14 06:18:14,410 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:14] "POST /web/dataset/call_kw/project.task/pad_is_configured HTTP/1.1" 200 -
2020-09-14 06:18:15,208 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:15] "POST /mail/read_followers HTTP/1.1" 200 -
2020-09-14 06:18:15,937 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:15] "POST /web/dataset/call_kw/mail.message/message_format HTTP/1.1" 200 -
2020-09-14 06:18:18,302 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:18] "POST /web/dataset/call_kw/ir.attachment/search_read HTTP/1.1" 200 -
2020-09-14 06:18:18,626 31527 INFO ? werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:18] "GET /web/static/src/img/spin.png HTTP/1.1" 200 -
2020-09-14 06:18:19,899 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:19] "GET /web/image/res.partner/7/image_small HTTP/1.1" 304 -
2020-09-14 06:18:19,941 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:19] "GET /web/image/res.partner/11/image_small HTTP/1.1" 304 -
2020-09-14 06:18:22,565 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:22] "POST /web/dataset/call_kw/helpdesk_lite.ticket/read_group HTTP/1.1" 200 -
2020-09-14 06:18:22,935 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:22] "POST /web/dataset/search_read HTTP/1.1" 200 -
2020-09-14 06:18:22,940 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:22] "POST /web/dataset/search_read HTTP/1.1" 200 -
2020-09-14 06:18:22,952 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:22] "POST /web/dataset/search_read HTTP/1.1" 200 -
2020-09-14 06:18:23,398 31527 WARNING dbtest1 odoo.models: helpdesk_lite.stage.read() with unknown field 'description'
2020-09-14 06:18:23,398 31527 WARNING dbtest1 odoo.models: helpdesk_lite.stage.read() with unknown field 'legend_priority'
2020-09-14 06:18:23,401 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:23] "POST /web/dataset/call_kw/helpdesk_lite.stage/read HTTP/1.1" 200 -
2020-09-14 06:18:24,441 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:24] "GET /web/image/res.partner/6/image_small HTTP/1.1" 304 -
2020-09-14 06:18:24,445 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:24] "GET /web/image/res.partner/9/image_small HTTP/1.1" 304 -
2020-09-14 06:18:24,446 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:24] "GET /web/image/res.partner/77/image_small HTTP/1.1" 304 -
2020-09-14 06:18:31,288 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:31] "POST /web/dataset/call_kw/mail.channel/channel_seen HTTP/1.1" 200 -
2020-09-14 06:18:31,293 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:31] "POST /longpolling/poll HTTP/1.1" 200 -
2020-09-14 06:18:33,624 31527 INFO dbtest1 werkzeug: 93.77.82.252 - - [14/Sep/2020 06:18:33] "POST /longpolling/poll HTTP/1.1" 200 -
2020-09-14 06:18:33,684 31527 INFO dbtest1 werkzeug: 178.150.235.68 - - [14/Sep/2020 06:18:33] "POST /longpolling/poll HTTP/1.1" 200 -
2020-09-14 06:18:33,685 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:33] "POST /longpolling/poll HTTP/1.1" 200 -
2020-09-14 06:18:33,733 31527 INFO dbtest1 werkzeug: 178.150.235.68 - - [14/Sep/2020 06:18:33] "POST /longpolling/poll HTTP/1.1" 200 -
2020-09-14 06:18:33,735 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:33] "POST /longpolling/poll HTTP/1.1" 200 -
2020-09-14 06:18:33,761 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:33] "POST /longpolling/poll HTTP/1.1" 200 -
2020-09-14 06:18:33,969 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:33] "POST /longpolling/poll HTTP/1.1" 200 -
2020-09-14 06:18:34,097 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:34] "POST /longpolling/poll HTTP/1.1" 200 -
2020-09-14 06:18:37,373 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:37] "POST /web/dataset/call_kw/mail.message/message_fetch HTTP/1.1" 200 -
2020-09-14 06:18:38,300 31527 INFO dbtest1 werkzeug: 217.12.195.21 - - [14/Sep/2020 06:18:38] "POST /web/dataset/call_kw/mail.channel/channel_fetch_listeners HTTP/1.1" 200 -

Apache conf:

<VirtualHost *:443>
ServerAdmin barlone@pro100systems.com.ua
ServerName odoo.pro100systems.com.ua
SSLEngine on
SSLProtocol           all -SSLv2 -SSLv3
SSLCipherSuite        ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM
SSLCertificateKeyFile /etc/letsencrypt/live/www.pro100systems.com.ua/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/www.pro100systems.com.ua/fullchain.pem
SSLCertificateFile /etc/letsencrypt/live/www.pro100systems.com.ua/cert.pem
RequestHeader set X-Forwarded-Proto "https"
<IfModule mod_rewrite.c>
RewriteEngine On
# Permanent redirect (301 HTTP) if no canonical domain name
RewriteCond %{HTTP_HOST} !^odoo.pro100systems.com.ua
RewriteRule ^/(.*)$ https://odoo.pro100systems.com.ua/$1 [R=301,NE,L]
</IfModule>
<Location "/" >
Order deny,allow
Deny from all
Allow from all
</Location> 
ProxyRequests Off
ProxyPreserveHost On
ProxyPass /                    http://192.168.0.106:8069/ retry=0
ProxyPassReverse /             http://192.168.0.106:8069/ retry=0
ErrorLog ${APACHE_LOG_DIR}/odoo_error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/odoo_access.log combined
</VirtualHost>

Odoo配置:

[options]
addons_path = /usr/lib/python3/dist-packages/odoo/addons
admin_passwd = $pbkdf2-sha512$25000$bu3dWwvh/F9r7R3DOEcIYQ$iASpvIrng4DQXJa/Y1mpoSNLLon3Jw/wBKba/b7FLs7IPSXSkuXteibCvLH7c936ER7LWaPOltx2yGvjjZmuMA
csv_internal_sep = ,
data_dir = /var/lib/odoo/.local/share/Odoo
db_host = False
db_maxconn = 64
db_name = False
db_password = False
db_port = False
db_sslmode = prefer
db_template = template1
db_user = odoo
dbfilter = 
demo = {}
email_from = False
geoip_database = /usr/share/GeoIP/GeoLite2-City.mmdb
http_enable = True
http_interface = 
http_port = 8069
import_partial = 
limit_memory_hard = 2684354560
limit_memory_soft = 2147483648
limit_request = 10000
limit_time_cpu = 800
limit_time_real = 1600
limit_time_real_cron = -1
list_db = True
log_db = False
log_db_level = warning
log_handler = :INFO
log_level = info
logfile = /var/log/odoo/odoo-server.log
logrotate = False
longpolling_port = 8072
max_cron_threads = 2
osv_memory_age_limit = 1.0
osv_memory_count_limit = False
pg_path = None
pidfile = False
proxy_mode = True
reportgz = False
server_wide_modules = web
smtp_password = False
smtp_port = 25
smtp_server = localhost
smtp_ssl = False
smtp_user = False
syslog = False
test_commit = False
test_enable = False
test_file = False
test_report_directory = False
translate_modules = ['all']
unaccent = False
without_demo = False
workers = 9

从更简单的apache配置开始,添加并尝试逐个添加更多规则。例如,我一直在为apache使用以下配置,它总是可以正常工作,没有任何问题。

<VirtualHost *:443>
ServerName ...
ServerAlias ...
LogLevel warn
ErrorLog ...
CustomLog ...
SSLEngine on
SSLProxyEngine on
SSLCertificateFile ...
SSLCertificateKeyFile ...
RemoteIPHeader X-Forwarded-For
ProxyPreserveHost On
ProxyPass / http://host:8069/
ProxyPassReverse / http://host:8069/
</VirtualHost>

建议使用proxy_mode = True,因为它与X-Forwarded-For标头相结合,可以正确地为Odoo提供请求的真实IP,因此建议使用Apache或Nginx进行反向代理设置。

相关内容

最新更新