Nginx + Docker (Nginx + Vue JS)
Есть сервер (VDS)
На сервере есть nginx.
Также на сервере крутится докер контейнер с еще одним nginx внутри.
Конфиг nginx в docker:
server {
listen 8080 default_server;
server_name _;
location /ssb
{
root /var/www;
index index.html;
}
}
Конфиг nginx на VDS:
server {
listen [::]:443 ssl ipv6only=on;
listen 443 ssl;
server_name xxx.ru www.xxx.ru;
ssl_certificate /...;
ssl_certificate_key /...;
include /...;
ssl_dhparam /...;
access_log /...;
root /var/www/xxx;
location / {
root /var/www/xxx/index;
index index.html;
}
location /ssb {
include proxy_params;
proxy_pass http://localhost:8080;
}
}
server {
listen 80;
listen [::]:80;
server_name xxx.ru www.xxx.ru;
if ($host = www.xxx.ru) {
return 301 https://$host$request_uri;
}
if ($host = xxx.ru) {
return 301 https://$host$request_uri;
}
}
Docker-compose.yml:
version: "3.7"
services:
frontend:
image: sfront
build: ./frontend
command: nginx -g daemon off
ports:
- 8080:8080
restart: always
depends_on:
- backend
network_mode: host
backend:
image: sbackend
build: ./backend
ports:
- 8000:8000
command: php -S localhost:8000
restart: always
При переходе на https://xxx.ru/ssb получаю редирект на http://xxx.ru:8080/ssb, на котором пустая страница.
Хотя по Network файлы грузятся.
В чём проблема?