ci: docker_tag=dev-test
- Correction vhosts port 3000: écoute sur 0.0.0.0:3000 et [::]:3000 - Harmonisation directives listen IPv6 pour éviter duplicate options - Configuration Nginx pour accès externe sur port 3000 - Support authentification ID.not via /authorized-client
This commit is contained in:
parent
ab31f16b0e
commit
0ee7de1ac1
@ -1,337 +1,92 @@
|
||||
# HTTP server for ACME and initial proxying
|
||||
# HTTP server for ACME and initial proxying
|
||||
server {
|
||||
server {
|
||||
listen 80;
|
||||
listen 80;
|
||||
server_name dev4.4nkweb.com;
|
||||
server_name dev4.4nkweb.com;
|
||||
|
||||
|
||||
# ACME HTTP-01 challenges
|
||||
# ACME HTTP-01 challenges
|
||||
location /.well-known/acme-challenge/ {
|
||||
location /.well-known/acme-challenge/ {
|
||||
root /var/www/letsencrypt;
|
||||
root /var/www/letsencrypt;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ihm_client (root)
|
||||
# ihm_client (root)
|
||||
location / {
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:3003;
|
||||
proxy_pass http://127.0.0.1:3003;
|
||||
include /etc/nginx/proxy_params;
|
||||
include /etc/nginx/proxy_params;
|
||||
# API backend - route /back/ vers /api/ du backend
|
||||
location ~* ^/back/(.*)$ {
|
||||
proxy_pass http://127.0.0.1:8080/api/$1;
|
||||
proxy_http_version 1.1;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_read_timeout 300;
|
||||
proxy_read_timeout 300;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Favicon (global)
|
||||
# Favicon (global)
|
||||
location = /favicon.ico {
|
||||
location = /favicon.ico {
|
||||
root /home/debian/lecoffre_node/conf/nginx/assets;
|
||||
root /home/debian/lecoffre_node/conf/nginx/assets;
|
||||
try_files /favicon.ico =404;
|
||||
try_files /favicon.ico =404;
|
||||
access_log off;
|
||||
access_log off;
|
||||
expires 30d;
|
||||
expires 30d;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# lecoffre-front
|
||||
# lecoffre-front
|
||||
location = /lecoffre {
|
||||
location = /lecoffre {
|
||||
proxy_pass http://127.0.0.2:3004/lecoffre;
|
||||
proxy_pass http://127.0.0.2:3004/lecoffre;
|
||||
include /etc/nginx/proxy_params;
|
||||
include /etc/nginx/proxy_params;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Prefix /lecoffre;
|
||||
proxy_set_header X-Forwarded-Prefix /lecoffre;
|
||||
proxy_read_timeout 300;
|
||||
proxy_read_timeout 300;
|
||||
}
|
||||
}
|
||||
location /lecoffre/ {
|
||||
location /lecoffre/ {
|
||||
proxy_pass http://127.0.0.2:3004;
|
||||
proxy_pass http://127.0.0.2:3004;
|
||||
include /etc/nginx/proxy_params;
|
||||
include /etc/nginx/proxy_params;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Prefix /lecoffre;
|
||||
proxy_set_header X-Forwarded-Prefix /lecoffre;
|
||||
proxy_read_timeout 300;
|
||||
proxy_read_timeout 300;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Next.js assets and HMR under basePath
|
||||
# Next.js assets and HMR under basePath
|
||||
location /lecoffre/_next/webpack-hmr {
|
||||
location /lecoffre/_next/webpack-hmr {
|
||||
proxy_http_version 1.1;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_buffering off;
|
||||
proxy_buffering off;
|
||||
proxy_pass http://127.0.0.2:3004/lecoffre/_next/webpack-hmr;
|
||||
proxy_pass http://127.0.0.2:3004/lecoffre/_next/webpack-hmr;
|
||||
proxy_read_timeout 600s;
|
||||
proxy_read_timeout 600s;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
location /lecoffre/_next/ {
|
||||
location /lecoffre/_next/ {
|
||||
proxy_pass http://127.0.0.2:3004/lecoffre/_next/;
|
||||
proxy_pass http://127.0.0.2:3004/lecoffre/_next/;
|
||||
include /etc/nginx/proxy_params;
|
||||
include /etc/nginx/proxy_params;
|
||||
proxy_read_timeout 300;
|
||||
proxy_read_timeout 300;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Favicon sous /lecoffre
|
||||
# Favicon sous /lecoffre
|
||||
location = /lecoffre/favicon.ico {
|
||||
location = /lecoffre/favicon.ico {
|
||||
root /home/debian/lecoffre_node/conf/nginx/assets;
|
||||
root /home/debian/lecoffre_node/conf/nginx/assets;
|
||||
try_files /favicon.ico =404;
|
||||
try_files /favicon.ico =404;
|
||||
access_log off;
|
||||
access_log off;
|
||||
expires 30d;
|
||||
expires 30d;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Next.js assets (served at root by the app)
|
||||
# Next.js assets (served at root by the app)
|
||||
location /_next/ {
|
||||
location /_next/ {
|
||||
proxy_pass http://127.0.0.2:3004/_next/;
|
||||
proxy_pass http://127.0.0.2:3004/_next/;
|
||||
include /etc/nginx/proxy_params;
|
||||
include /etc/nginx/proxy_params;
|
||||
proxy_read_timeout 300;
|
||||
proxy_read_timeout 300;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# API backend
|
||||
# API backend
|
||||
location /back/ {
|
||||
rewrite ^\/back\/(.*)$ \/api\/\1 break;
|
||||
proxy_pass http:\/\/127.0.0.1:8080;
|
||||
location /back/ {
|
||||
location /back/ {
|
||||
rewrite ^\/back\/(.*)$ \/api\/\1 break;
|
||||
proxy_pass http:\/\/127.0.0.1:8080;
|
||||
location /back/ {
|
||||
proxy_pass http://127.0.0.1:8080/back/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Connection "";
|
||||
proxy_set_header Connection "";
|
||||
proxy_buffering off;
|
||||
proxy_buffering off;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# API alias → même backend que /back
|
||||
# API alias → même backend que /back
|
||||
# API direct - route /api/ vers le backend
|
||||
location /api/ {
|
||||
location /api/ {
|
||||
proxy_pass http://127.0.0.1:8080/;
|
||||
proxy_pass http://127.0.0.1:8080/;
|
||||
include /etc/nginx/proxy_params;
|
||||
proxy_pass http://127.0.0.1:8080/api/;
|
||||
include /etc/nginx/proxy_params;
|
||||
proxy_read_timeout 300;
|
||||
proxy_read_timeout 300;
|
||||
}
|
||||
proxy_connect_timeout 300;
|
||||
proxy_send_timeout 300;
|
||||
}
|
||||
|
||||
# ihm_client (root)
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:3003;
|
||||
include /etc/nginx/proxy_params;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_read_timeout 300;
|
||||
}
|
||||
|
||||
# favicon
|
||||
location = /favicon.ico {
|
||||
root /home/debian/lecoffre_node/conf/nginx/assets;
|
||||
try_files /favicon.ico =404;
|
||||
access_log off;
|
||||
expires 30d;
|
||||
}
|
||||
|
||||
# lecoffre frontend
|
||||
location = /lecoffre {
|
||||
proxy_pass http://127.0.0.2:3004/lecoffre;
|
||||
include /etc/nginx/proxy_params;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
}
|
||||
|
||||
location /lecoffre/ {
|
||||
proxy_pass http://127.0.0.2:3004/lecoffre/;
|
||||
include /etc/nginx/proxy_params;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_read_timeout 300;
|
||||
}
|
||||
|
||||
# Next.js assets
|
||||
location /_next/ {
|
||||
proxy_pass http://127.0.0.2:3004/_next/;
|
||||
include /etc/nginx/proxy_params;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
}
|
||||
|
||||
# blindbit
|
||||
# blindbit
|
||||
location /blindbit/ {
|
||||
location /blindbit/ {
|
||||
proxy_pass http://127.0.0.1:8000/;
|
||||
proxy_pass http://127.0.0.1:8000/;
|
||||
include /etc/nginx/proxy_params;
|
||||
include /etc/nginx/proxy_params;
|
||||
proxy_read_timeout 300;
|
||||
proxy_read_timeout 300;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# signer (sdk_signer) avec support WebSocket
|
||||
# signer (sdk_signer) avec support WebSocket
|
||||
location /signer/ {
|
||||
location /signer/ {
|
||||
proxy_http_version 1.1;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_pass http://127.0.0.1:3001/;
|
||||
proxy_pass http://127.0.0.1:3001/;
|
||||
proxy_read_timeout 600s;
|
||||
proxy_read_timeout 600s;
|
||||
proxy_buffering off;
|
||||
proxy_buffering off;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# storage (sdk_storage)
|
||||
# storage (sdk_storage)
|
||||
location /storage/ {
|
||||
location /storage/ {
|
||||
proxy_pass http://127.0.0.1:8081/;
|
||||
proxy_pass http://127.0.0.1:8081/;
|
||||
include /etc/nginx/proxy_params;
|
||||
include /etc/nginx/proxy_params;
|
||||
proxy_read_timeout 300;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_read_timeout 300;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# WebSocket relay on /ws → 8090
|
||||
# WebSocket relay on /ws → 8090
|
||||
location = /ws {
|
||||
location = /ws {
|
||||
proxy_http_version 1.1;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_buffering off;
|
||||
proxy_buffering off;
|
||||
proxy_pass http://127.0.0.1:8090/;
|
||||
proxy_pass http://127.0.0.1:8090/;
|
||||
proxy_read_timeout 600s;
|
||||
proxy_read_timeout 600s;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
location /ws/ {
|
||||
location /ws/ {
|
||||
proxy_http_version 1.1;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_buffering off;
|
||||
proxy_buffering off;
|
||||
# Strip /ws prefix when proxying to backend root
|
||||
# Strip /ws prefix when proxying to backend root
|
||||
proxy_pass http://127.0.0.1:8090/;
|
||||
proxy_pass http://127.0.0.1:8090/;
|
||||
proxy_read_timeout 600s;
|
||||
proxy_read_timeout 600s;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Next.js HMR websocket for lecoffre-front
|
||||
# Next.js HMR websocket for lecoffre-front
|
||||
location /_next/webpack-hmr {
|
||||
location /_next/webpack-hmr {
|
||||
proxy_http_version 1.1;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_buffering off;
|
||||
proxy_buffering off;
|
||||
proxy_pass http://127.0.0.2:3004/_next/webpack-hmr;
|
||||
proxy_pass http://127.0.0.2:3004/_next/webpack-hmr;
|
||||
proxy_read_timeout 300;
|
||||
proxy_read_timeout 300;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
337
conf/nginx/dev4.4nkweb.com.conf.clean
Normal file
337
conf/nginx/dev4.4nkweb.com.conf.clean
Normal file
@ -0,0 +1,337 @@
|
||||
# HTTP server for ACME and initial proxying
|
||||
# HTTP server for ACME and initial proxying
|
||||
server {
|
||||
server {
|
||||
listen 80;
|
||||
listen 80;
|
||||
server_name dev4.4nkweb.com;
|
||||
server_name dev4.4nkweb.com;
|
||||
|
||||
|
||||
# ACME HTTP-01 challenges
|
||||
# ACME HTTP-01 challenges
|
||||
location /.well-known/acme-challenge/ {
|
||||
location /.well-known/acme-challenge/ {
|
||||
root /var/www/letsencrypt;
|
||||
root /var/www/letsencrypt;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ihm_client (root)
|
||||
# ihm_client (root)
|
||||
location / {
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:3003;
|
||||
proxy_pass http://127.0.0.1:3003;
|
||||
include /etc/nginx/proxy_params;
|
||||
include /etc/nginx/proxy_params;
|
||||
proxy_http_version 1.1;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_read_timeout 300;
|
||||
proxy_read_timeout 300;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Favicon (global)
|
||||
# Favicon (global)
|
||||
location = /favicon.ico {
|
||||
location = /favicon.ico {
|
||||
root /home/debian/lecoffre_node/conf/nginx/assets;
|
||||
root /home/debian/lecoffre_node/conf/nginx/assets;
|
||||
try_files /favicon.ico =404;
|
||||
try_files /favicon.ico =404;
|
||||
access_log off;
|
||||
access_log off;
|
||||
expires 30d;
|
||||
expires 30d;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# lecoffre-front
|
||||
# lecoffre-front
|
||||
location = /lecoffre {
|
||||
location = /lecoffre {
|
||||
proxy_pass http://127.0.0.2:3004/lecoffre;
|
||||
proxy_pass http://127.0.0.2:3004/lecoffre;
|
||||
include /etc/nginx/proxy_params;
|
||||
include /etc/nginx/proxy_params;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Prefix /lecoffre;
|
||||
proxy_set_header X-Forwarded-Prefix /lecoffre;
|
||||
proxy_read_timeout 300;
|
||||
proxy_read_timeout 300;
|
||||
}
|
||||
}
|
||||
location /lecoffre/ {
|
||||
location /lecoffre/ {
|
||||
proxy_pass http://127.0.0.2:3004;
|
||||
proxy_pass http://127.0.0.2:3004;
|
||||
include /etc/nginx/proxy_params;
|
||||
include /etc/nginx/proxy_params;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Prefix /lecoffre;
|
||||
proxy_set_header X-Forwarded-Prefix /lecoffre;
|
||||
proxy_read_timeout 300;
|
||||
proxy_read_timeout 300;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Next.js assets and HMR under basePath
|
||||
# Next.js assets and HMR under basePath
|
||||
location /lecoffre/_next/webpack-hmr {
|
||||
location /lecoffre/_next/webpack-hmr {
|
||||
proxy_http_version 1.1;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_buffering off;
|
||||
proxy_buffering off;
|
||||
proxy_pass http://127.0.0.2:3004/lecoffre/_next/webpack-hmr;
|
||||
proxy_pass http://127.0.0.2:3004/lecoffre/_next/webpack-hmr;
|
||||
proxy_read_timeout 600s;
|
||||
proxy_read_timeout 600s;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
location /lecoffre/_next/ {
|
||||
location /lecoffre/_next/ {
|
||||
proxy_pass http://127.0.0.2:3004/lecoffre/_next/;
|
||||
proxy_pass http://127.0.0.2:3004/lecoffre/_next/;
|
||||
include /etc/nginx/proxy_params;
|
||||
include /etc/nginx/proxy_params;
|
||||
proxy_read_timeout 300;
|
||||
proxy_read_timeout 300;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Favicon sous /lecoffre
|
||||
# Favicon sous /lecoffre
|
||||
location = /lecoffre/favicon.ico {
|
||||
location = /lecoffre/favicon.ico {
|
||||
root /home/debian/lecoffre_node/conf/nginx/assets;
|
||||
root /home/debian/lecoffre_node/conf/nginx/assets;
|
||||
try_files /favicon.ico =404;
|
||||
try_files /favicon.ico =404;
|
||||
access_log off;
|
||||
access_log off;
|
||||
expires 30d;
|
||||
expires 30d;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Next.js assets (served at root by the app)
|
||||
# Next.js assets (served at root by the app)
|
||||
location /_next/ {
|
||||
location /_next/ {
|
||||
proxy_pass http://127.0.0.2:3004/_next/;
|
||||
proxy_pass http://127.0.0.2:3004/_next/;
|
||||
include /etc/nginx/proxy_params;
|
||||
include /etc/nginx/proxy_params;
|
||||
proxy_read_timeout 300;
|
||||
proxy_read_timeout 300;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# API backend
|
||||
# API backend
|
||||
location /back/ {
|
||||
rewrite ^\/back\/(.*)$ \/api\/\1 break;
|
||||
proxy_pass http:\/\/127.0.0.1:8080;
|
||||
location /back/ {
|
||||
location /back/ {
|
||||
rewrite ^\/back\/(.*)$ \/api\/\1 break;
|
||||
proxy_pass http:\/\/127.0.0.1:8080;
|
||||
location /back/ {
|
||||
proxy_pass http://127.0.0.1:8080/back/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Connection "";
|
||||
proxy_set_header Connection "";
|
||||
proxy_buffering off;
|
||||
proxy_buffering off;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# API alias → même backend que /back
|
||||
# API alias → même backend que /back
|
||||
location /api/ {
|
||||
location /api/ {
|
||||
proxy_pass http://127.0.0.1:8080/;
|
||||
proxy_pass http://127.0.0.1:8080/;
|
||||
include /etc/nginx/proxy_params;
|
||||
include /etc/nginx/proxy_params;
|
||||
proxy_read_timeout 300;
|
||||
proxy_read_timeout 300;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# blindbit
|
||||
# blindbit
|
||||
location /blindbit/ {
|
||||
location /blindbit/ {
|
||||
proxy_pass http://127.0.0.1:8000/;
|
||||
proxy_pass http://127.0.0.1:8000/;
|
||||
include /etc/nginx/proxy_params;
|
||||
include /etc/nginx/proxy_params;
|
||||
proxy_read_timeout 300;
|
||||
proxy_read_timeout 300;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# signer (sdk_signer) avec support WebSocket
|
||||
# signer (sdk_signer) avec support WebSocket
|
||||
location /signer/ {
|
||||
location /signer/ {
|
||||
proxy_http_version 1.1;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_pass http://127.0.0.1:3001/;
|
||||
proxy_pass http://127.0.0.1:3001/;
|
||||
proxy_read_timeout 600s;
|
||||
proxy_read_timeout 600s;
|
||||
proxy_buffering off;
|
||||
proxy_buffering off;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# storage (sdk_storage)
|
||||
# storage (sdk_storage)
|
||||
location /storage/ {
|
||||
location /storage/ {
|
||||
proxy_pass http://127.0.0.1:8081/;
|
||||
proxy_pass http://127.0.0.1:8081/;
|
||||
include /etc/nginx/proxy_params;
|
||||
include /etc/nginx/proxy_params;
|
||||
proxy_read_timeout 300;
|
||||
proxy_read_timeout 300;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# WebSocket relay on /ws → 8090
|
||||
# WebSocket relay on /ws → 8090
|
||||
location = /ws {
|
||||
location = /ws {
|
||||
proxy_http_version 1.1;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_buffering off;
|
||||
proxy_buffering off;
|
||||
proxy_pass http://127.0.0.1:8090/;
|
||||
proxy_pass http://127.0.0.1:8090/;
|
||||
proxy_read_timeout 600s;
|
||||
proxy_read_timeout 600s;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
location /ws/ {
|
||||
location /ws/ {
|
||||
proxy_http_version 1.1;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_buffering off;
|
||||
proxy_buffering off;
|
||||
# Strip /ws prefix when proxying to backend root
|
||||
# Strip /ws prefix when proxying to backend root
|
||||
proxy_pass http://127.0.0.1:8090/;
|
||||
proxy_pass http://127.0.0.1:8090/;
|
||||
proxy_read_timeout 600s;
|
||||
proxy_read_timeout 600s;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Next.js HMR websocket for lecoffre-front
|
||||
# Next.js HMR websocket for lecoffre-front
|
||||
location /_next/webpack-hmr {
|
||||
location /_next/webpack-hmr {
|
||||
proxy_http_version 1.1;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_buffering off;
|
||||
proxy_buffering off;
|
||||
proxy_pass http://127.0.0.2:3004/_next/webpack-hmr;
|
||||
proxy_pass http://127.0.0.2:3004/_next/webpack-hmr;
|
||||
proxy_read_timeout 300;
|
||||
proxy_read_timeout 300;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
273
conf/nginx/dev4.4nkweb.com.conf.tmp
Normal file
273
conf/nginx/dev4.4nkweb.com.conf.tmp
Normal file
@ -0,0 +1,273 @@
|
||||
server {
|
||||
server {
|
||||
listen 80;
|
||||
listen 80;
|
||||
server_name dev4.4nkweb.com;
|
||||
server_name dev4.4nkweb.com;
|
||||
location /.well-known/acme-challenge/ {
|
||||
location /.well-known/acme-challenge/ {
|
||||
root /var/www/letsencrypt;
|
||||
root /var/www/letsencrypt;
|
||||
}
|
||||
}
|
||||
location / {
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:3003;
|
||||
proxy_pass http://127.0.0.1:3003;
|
||||
include /etc/nginx/proxy_params;
|
||||
include /etc/nginx/proxy_params;
|
||||
proxy_http_version 1.1;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_read_timeout 300;
|
||||
proxy_read_timeout 300;
|
||||
}
|
||||
}
|
||||
location = /favicon.ico {
|
||||
location = /favicon.ico {
|
||||
root /home/debian/lecoffre_node/conf/nginx/assets;
|
||||
root /home/debian/lecoffre_node/conf/nginx/assets;
|
||||
try_files /favicon.ico =404;
|
||||
try_files /favicon.ico =404;
|
||||
access_log off;
|
||||
access_log off;
|
||||
expires 30d;
|
||||
expires 30d;
|
||||
}
|
||||
}
|
||||
location = /lecoffre {
|
||||
location = /lecoffre {
|
||||
proxy_pass http://127.0.0.2:3004/lecoffre;
|
||||
proxy_pass http://127.0.0.2:3004/lecoffre;
|
||||
include /etc/nginx/proxy_params;
|
||||
include /etc/nginx/proxy_params;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Prefix /lecoffre;
|
||||
proxy_set_header X-Forwarded-Prefix /lecoffre;
|
||||
proxy_read_timeout 300;
|
||||
proxy_read_timeout 300;
|
||||
}
|
||||
}
|
||||
location /lecoffre/ {
|
||||
location /lecoffre/ {
|
||||
proxy_pass http://127.0.0.2:3004;
|
||||
proxy_pass http://127.0.0.2:3004;
|
||||
include /etc/nginx/proxy_params;
|
||||
include /etc/nginx/proxy_params;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Prefix /lecoffre;
|
||||
proxy_set_header X-Forwarded-Prefix /lecoffre;
|
||||
proxy_read_timeout 300;
|
||||
proxy_read_timeout 300;
|
||||
}
|
||||
}
|
||||
location /lecoffre/_next/webpack-hmr {
|
||||
location /lecoffre/_next/webpack-hmr {
|
||||
proxy_http_version 1.1;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_buffering off;
|
||||
proxy_buffering off;
|
||||
proxy_pass http://127.0.0.2:3004/lecoffre/_next/webpack-hmr;
|
||||
proxy_pass http://127.0.0.2:3004/lecoffre/_next/webpack-hmr;
|
||||
proxy_read_timeout 600s;
|
||||
proxy_read_timeout 600s;
|
||||
}
|
||||
}
|
||||
location /lecoffre/_next/ {
|
||||
location /lecoffre/_next/ {
|
||||
proxy_pass http://127.0.0.2:3004/lecoffre/_next/;
|
||||
proxy_pass http://127.0.0.2:3004/lecoffre/_next/;
|
||||
include /etc/nginx/proxy_params;
|
||||
include /etc/nginx/proxy_params;
|
||||
proxy_read_timeout 300;
|
||||
proxy_read_timeout 300;
|
||||
}
|
||||
}
|
||||
location = /lecoffre/favicon.ico {
|
||||
location = /lecoffre/favicon.ico {
|
||||
root /home/debian/lecoffre_node/conf/nginx/assets;
|
||||
root /home/debian/lecoffre_node/conf/nginx/assets;
|
||||
try_files /favicon.ico =404;
|
||||
try_files /favicon.ico =404;
|
||||
access_log off;
|
||||
access_log off;
|
||||
expires 30d;
|
||||
expires 30d;
|
||||
}
|
||||
}
|
||||
location /_next/ {
|
||||
location /_next/ {
|
||||
proxy_pass http://127.0.0.2:3004/_next/;
|
||||
proxy_pass http://127.0.0.2:3004/_next/;
|
||||
include /etc/nginx/proxy_params;
|
||||
include /etc/nginx/proxy_params;
|
||||
proxy_read_timeout 300;
|
||||
proxy_read_timeout 300;
|
||||
}
|
||||
}
|
||||
location /back/ {
|
||||
rewrite ^\/back\/(.*)$ \/api\/\1 break;
|
||||
proxy_pass http:\/\/127.0.0.1:8080;
|
||||
location /back/ {
|
||||
location /back/ {
|
||||
rewrite ^\/back\/(.*)$ \/api\/\1 break;
|
||||
proxy_pass http:\/\/127.0.0.1:8080;
|
||||
location /back/ {
|
||||
proxy_pass http://127.0.0.1:8080/back/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Connection "";
|
||||
proxy_set_header Connection "";
|
||||
proxy_buffering off;
|
||||
proxy_buffering off;
|
||||
}
|
||||
}
|
||||
location /api/ {
|
||||
location /api/ {
|
||||
proxy_pass http://127.0.0.1:8080/;
|
||||
proxy_pass http://127.0.0.1:8080/;
|
||||
include /etc/nginx/proxy_params;
|
||||
include /etc/nginx/proxy_params;
|
||||
proxy_read_timeout 300;
|
||||
proxy_read_timeout 300;
|
||||
}
|
||||
}
|
||||
location /blindbit/ {
|
||||
location /blindbit/ {
|
||||
proxy_pass http://127.0.0.1:8000/;
|
||||
proxy_pass http://127.0.0.1:8000/;
|
||||
include /etc/nginx/proxy_params;
|
||||
include /etc/nginx/proxy_params;
|
||||
proxy_read_timeout 300;
|
||||
proxy_read_timeout 300;
|
||||
}
|
||||
}
|
||||
location /signer/ {
|
||||
location /signer/ {
|
||||
proxy_http_version 1.1;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_pass http://127.0.0.1:3001/;
|
||||
proxy_pass http://127.0.0.1:3001/;
|
||||
proxy_read_timeout 600s;
|
||||
proxy_read_timeout 600s;
|
||||
proxy_buffering off;
|
||||
proxy_buffering off;
|
||||
}
|
||||
}
|
||||
location /storage/ {
|
||||
location /storage/ {
|
||||
proxy_pass http://127.0.0.1:8081/;
|
||||
proxy_pass http://127.0.0.1:8081/;
|
||||
include /etc/nginx/proxy_params;
|
||||
include /etc/nginx/proxy_params;
|
||||
proxy_read_timeout 300;
|
||||
proxy_read_timeout 300;
|
||||
}
|
||||
}
|
||||
location = /ws {
|
||||
location = /ws {
|
||||
proxy_http_version 1.1;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_buffering off;
|
||||
proxy_buffering off;
|
||||
proxy_pass http://127.0.0.1:8090/;
|
||||
proxy_pass http://127.0.0.1:8090/;
|
||||
proxy_read_timeout 600s;
|
||||
proxy_read_timeout 600s;
|
||||
}
|
||||
}
|
||||
location /ws/ {
|
||||
location /ws/ {
|
||||
proxy_http_version 1.1;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_buffering off;
|
||||
proxy_buffering off;
|
||||
proxy_pass http://127.0.0.1:8090/;
|
||||
proxy_pass http://127.0.0.1:8090/;
|
||||
proxy_read_timeout 600s;
|
||||
proxy_read_timeout 600s;
|
||||
}
|
||||
}
|
||||
location /_next/webpack-hmr {
|
||||
location /_next/webpack-hmr {
|
||||
proxy_http_version 1.1;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_buffering off;
|
||||
proxy_buffering off;
|
||||
proxy_pass http://127.0.0.2:3004/_next/webpack-hmr;
|
||||
proxy_pass http://127.0.0.2:3004/_next/webpack-hmr;
|
||||
proxy_read_timeout 300;
|
||||
proxy_read_timeout 300;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user