feat: nginx wildcard static site server for *.auraajenticai.cloud

This commit is contained in:
khondokartowsif171
2026-05-25 20:19:11 +06:00
commit 5a7d66865c
2 changed files with 42 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
worker_processes auto;
events { worker_connections 1024; }
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
gzip on;
gzip_types text/html text/css application/javascript application/json image/svg+xml text/plain;
# Wildcard vhost — routes *.auraajenticai.cloud to /sites/{subdomain}/
server {
listen 80 default_server;
listen [::]:80 default_server;
# Extract subdomain from Host header
set $subdomain "";
if ($host ~* ^([^.]+)\.auraajenticai\.cloud$) {
set $subdomain $1;
}
# Reject if no subdomain resolved
if ($subdomain = "") {
return 444;
}
root /sites/$subdomain;
index index.html;
add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff;
location / {
try_files $uri $uri/ /index.html =404;
}
}
}