47 lines
1.6 KiB
Nginx Configuration File
47 lines
1.6 KiB
Nginx Configuration File
worker_processes auto;
|
|
|
|
events {
|
|
worker_connections 512;
|
|
}
|
|
|
|
http {
|
|
resolver 127.0.0.11;
|
|
|
|
upstream backend {
|
|
server code-server:8443 fail_timeout=30;
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl default_server;
|
|
server_name localhost;
|
|
|
|
ssl_protocols TLSv1.3;
|
|
ssl_prefer_server_ciphers on;
|
|
ssl_session_cache shared:SSL:10m;
|
|
ssl_stapling on;
|
|
ssl_stapling_verify on;
|
|
ssl_certificate /etc/nginx/ssl/oracle-tf-demo_cert.pem;
|
|
ssl_certificate_key /etc/nginx/ssl/oracle-tf-demo_privkey.pem;
|
|
|
|
location / {
|
|
proxy_pass http://backend;
|
|
proxy_set_header Accept-Encoding gzip;
|
|
proxy_set_header Connection upgrade;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
proxy_set_header X-Forwarded-Proto https;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_ssl_server_name on;
|
|
proxy_ssl_trusted_certificate /etc/nginx/ssl/oracle-tf-demo_cert.pem;
|
|
proxy_ssl_verify on;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
server_name $(REMOTE HOST GOES HERE);
|
|
return 301 https://$(REMOTE HOST GOES HERE)$request_uri;
|
|
}
|
|
}
|