I set up an nginx proxy in front of the moqui server to forward nginx 80 port information to moqui 8080. At the same time, I set SSL in AWS to point to nginx 80, but a moqui form action appeared. The CSS resource was sourced from https The SSL secure link has become http url and 443 port How to solve the problem of the form being unable to submit the correct URL due to a non secure link with a port.
my nginx conf:
server {
listen 80;
server_name domain
charset utf8;
#access_log logs/host.access.log main;
add_header Content-Security-Policy "form-action 'self' *; default-src 'self' *; script-src 'self' 'unsafe-inline' 'unsafe-eval' *; style-src 'self' 'unsafe-inline' *; img-src 'self' data: https: http:; connect-src *";
location / {
proxy_pass
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header REMOTE_ADDR $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port 443;
proxy_redirect http:// $scheme://;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
#
proxy_pass_request_headers on;
}
#
location ~ \.php$ {
return 403;
}
but not work.
Does anyone know how to solve it?
thanks
Houcun
2024.10.2