Обновился на версию 6, и возник вопрос как мне настроить отдельный nginx conf для проекта.
Есть самописный проект test.local, работает с WebSockets, поэтому надо свой conf, я его создал в /.osp/nginx/test.local.conf
upstream websockests {
server 127.127.126.55:2050;
}
server {
listen 80;
server_name test.local;
return 302 https://\$server_name\$request_uri;
}
server {
listen 433;
server_name test.local alias.test.local;
charset utf-8;
autoindex off;
index index.php;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~* \.php$ {
include {полный путь к ospanel}/modules/Nginx-1.26/conf/fastcgi_params;
fastcgi_index index.php;
fastcgi_pass 127.127.126.58:9000;
}
location = /socket {
charset utf-8;
proxy_pass http://websockets;
proxy_http_version 1.1;
proxy_buffering off;
proxy_read_timeout 86400s;
proxy_send_timeout 86400s;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
Мне начала показываться страница "Как вы тут оказались?", хотя без кастомного conf все запускалось (кроме WS)Также как мне добавить сертификаты для порта 433 которые подтягиваются без кастомного nginx?
