Changed composition to make it easier to user

This commit is contained in:
Christian Risi
2025-06-25 16:12:08 +02:00
parent cc7f8bcba8
commit fa8d967748
9 changed files with 86 additions and 218 deletions

View File

@@ -0,0 +1,38 @@
# Example conf
# Example TLS endpoint
server {
more_clear_headers Server;
listen PORT ssl;
http2 on;
location / {
grpc_pass grpc://127.0.0.1:PORT;
}
ssl_certificate /services-keys/Example/cert.pem;
ssl_certificate_key /services-keys/Example/key.pem;
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
}
# Example Termination endpoint
server {
more_clear_headers Server;
listen 127.0.0.1:PORT;
http2 on;
# Here put the service you need
location / {
grpc_pass grpcs://127.0.0.1:PORT;
}
}

View File

@@ -0,0 +1,37 @@
# Example conf
# Example TLS endpoint
server {
listen PORT ssl;
more_clear_headers Server;
location / {
proxy_pass http://localhost:8080;
}
ssl_certificate /services-keys/Example/cert.pem;
ssl_certificate_key /services-keys/Example/key.pem;
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
}
# Example Termination endpoint
server {
more_clear_headers Server;
listen 127.0.0.1:8080;
# Here put the service you need
location / {
proxy_pass https://127.0.0.1:PORT;
}
}

View File

@@ -1,23 +0,0 @@
server {
listen *:3443 ssl;
ssl_certificate /services-keys/ExpressTLS/cert.pem;
ssl_certificate_key /services-keys/ExpressTLS/key.pem;
ssl_protocols TLSv1.3;
location / {
proxy_pass http://localhost:3080/;
}
}
server {
listen 127.0.0.1:3080;
location / {
proxy_pass https://express-tls:8443/;
}
}

View File

@@ -3,14 +3,11 @@ user nginx;
# Set number of worker processes automatically based on number of CPU cores.
worker_processes auto;
# Load ngx_stream_module
# Load Modules
load_module /usr/lib/nginx/modules/ngx_stream_module.so;
load_module /usr/lib/nginx/modules/ngx_http_headers_more_filter_module.so;
# Enables the use of JIT for regular expressions to speed-up their processing.
pcre_jit on;
@@ -37,9 +34,9 @@ http {
'"$http_user_agent" "$http_x_forwarded_for"';
# Includes virtual hosts configs.
include /etc/nginx/http/*.conf;
include /etc/nginx/grpc/*.conf;
}
stream {

View File

@@ -1,33 +0,0 @@
upstream backend_ssl_ter {
server localhost:3080;
}
upstream backend {
server https://express-tls:8443;
}
server {
listen 3443 ssl;
more_clear_headers Server;
proxy_pass backend_ssl_ter;
ssl_certificate /services-keys/ExpressTLS/cert.pem;
ssl_certificate_key /services-keys/ExpressTLS/key.pem;
ssl_protocols TLSv1.3;
}
server {
more_clear_headers Server;
listen 3080;
proxy_pass backend;
}