У меня есть VPS под управлением nginx, и я клонировал этот проект civiCRM:
https://github.com/altsalt/civicrm-docker.git
Теперь я хочу, чтобы мой NGINX (не в контейнере) передавал запросы к nginx (в контейнере), и этот будет fastcgi_pass для приложения.
Мой NGINX CONFIG
server {
# Server name being used (exact name, wildcards or regular expression)
server_name www.compucorpe.tk compucorpe.tk
# Logging
error_log /var/log/compucorpe.error_log;
access_log /var/log/compucorpe.acess_log;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Forwarded-Proto $scheme;
#proxy_redirect http://127.0.0.1:8081 https://www.compucorpe.tk;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/www.compucorpe.tk/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/www.compucorpe.tk/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = compucorpe.tk) {
return 301 https://$host$request_uri;
} # managed by Certbot
if ($host = www.compucorpe.tk) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name www.compucorpe.tk compucorpe.tk
# Logging
error_log /var/log/compucorpe.error_log;
return 404; # managed by Certbot
Задача ещё не решена.
Других решений пока нет …