История изменений
Исправление s13, (текущая версия) :
Через php-шный yii поднимаются локальные tcp-сокеты, nginx проксирует их наружу через фронт.
server {
server_name myapp.testdomain;
index index.html index.php;
access_log /opt/myapp/log/nginx-access.log;
error_log /opt/myapp/log/nginx-error.log;
listen 443 ssl;
### SSL ###
include /etc/nginx/ssl.d/myapp.conf;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
### Кеширование ###
proxy_cache all;
proxy_cache_valid any 6h;
location / {
root /opt/myapp/frontend/;
index index.html;
try_files $uri $uri/ /index.html?$query_string;
}
location /websocket {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_pass http://balancer;
}
Исправление s13, :
Через php-шный yii поднимаются локальные tcp-сокеты, nginx проксирует их наружу через фронт.
server { server_name myapp.testdomain; index index.html index.php; access_log /opt/myapp/log/nginx-access.log; error_log /opt/myapp/log/nginx-error.log; listen 443 ssl;
### SSL ###
include /etc/nginx/ssl.d/myapp.conf;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
### Кеширование ###
proxy_cache all;
proxy_cache_valid any 6h;
location / {
root /opt/myapp/frontend/;
index index.html;
try_files $uri $uri/ /index.html?$query_string;
}
location /websocket {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_pass http://balancer;
}
Исходная версия s13, :
Через php-шный yii поднимаются локальные tcp-сокеты, nginx проксирует их наружу через фронт.
server { server_name myapp.testdomain; index index.html index.php; access_log /opt/myapp/log/nginx-access.log; error_log /opt/myapp/log/nginx-error.log; listen 443 ssl;
### SSL ###
include /etc/nginx/ssl.d/myapp.conf;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
### Кеширование ###
proxy_cache all;
proxy_cache_valid any 6h;
location / { root /opt/myapp/frontend/; index index.html; try_files $uri $uri/ /index.html?$query_string; }
location /websocket { proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection «upgrade»; proxy_set_header Host $host; proxy_pass http://balancer; }