-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathnginx-dev.conf
More file actions
61 lines (47 loc) Β· 1.79 KB
/
nginx-dev.conf
File metadata and controls
61 lines (47 loc) Β· 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
worker_processes auto;
error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
server_names_hash_bucket_size 128;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
keepalive_timeout 65;
# π Redirect all HTTP traffic to HTTPS
server {
listen 80;
server_name runbox.ai *.runbox.ai;
location / {
return 301 https://$host$request_uri;
}
}
# β
HTTPS server block for all subdomains and root domain
# server {
# listen 443 ssl;
# server_name runbox.ai *.runbox.ai;
# ssl_certificate /etc/letsencrypt/live/runbox.ai/fullchain.pem;
# ssl_certificate_key /etc/letsencrypt/live/runbox.ai/privkey.pem;
# ssl_protocols TLSv1.2 TLSv1.3;
# ssl_ciphers HIGH:!aNULL:!MD5;
# # π Main reverse proxy for root domain or general requests
# location / {
# proxy_pass http://localhost:8888/;
# proxy_http_version 1.1;
# proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection 'upgrade';
# proxy_set_header Host $host;
# proxy_cache_bypass $http_upgrade;
# }
# # π Optional: tighter security
# # add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
# }
# π Include all dynamic per-subdomain configs
include /runbox/nginx/dynamics/*.conf;
}