82 lines
3.3 KiB
YAML
82 lines
3.3 KiB
YAML
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: blog-nginx
|
|
data:
|
|
nginx.conf: |
|
|
worker_processes auto;
|
|
pid /tmp/nginx.pid;
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
include mime.types;
|
|
|
|
sendfile on;
|
|
tcp_nopush on;
|
|
# Prevent nginx HTTP Server Detection
|
|
server_tokens off;
|
|
|
|
keepalive_timeout 65;
|
|
|
|
server {
|
|
server_name tymur999.com;
|
|
listen 8000;
|
|
|
|
# set max upload size and increase upload timeout:
|
|
client_max_body_size 10G;
|
|
client_body_timeout 300s;
|
|
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Forwarded-Proto https;
|
|
|
|
gzip on;
|
|
gzip_vary on;
|
|
gzip_comp_level 4;
|
|
gzip_min_length 256;
|
|
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
|
|
gzip_types application/atom+xml text/javascript application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/wasm application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
|
|
|
|
# HTTP response headers borrowed from Nextcloud `.htaccess`
|
|
add_header Referrer-Policy "no-referrer" always;
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
add_header X-Frame-Options "SAMEORIGIN" always;
|
|
add_header X-Permitted-Cross-Domain-Policies "none" always;
|
|
add_header X-Robots-Tag "noindex, nofollow" always;
|
|
add_header X-XSS-Protection "1; mode=block" always;
|
|
|
|
# Path to the root of your installation
|
|
root /var/www/html;
|
|
index index.html;
|
|
|
|
location = /robots.txt {
|
|
allow all;
|
|
log_not_found off;
|
|
access_log off;
|
|
}
|
|
|
|
# Serve static files
|
|
location ~ \.(?:css|js|mjs|svg|gif|ico|jpg|png|webp|wasm|tflite|map|ogg|flac)$ {
|
|
try_files $uri /index.php$request_uri;
|
|
add_header Cache-Control "public, max-age=15778463";
|
|
add_header Referrer-Policy "no-referrer" always;
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
add_header X-Frame-Options "SAMEORIGIN" always;
|
|
add_header X-Permitted-Cross-Domain-Policies "none" always;
|
|
add_header X-Robots-Tag "noindex, nofollow" always;
|
|
add_header X-XSS-Protection "1; mode=block" always;
|
|
}
|
|
|
|
location ~ \.(otf|woff2?)$ {
|
|
try_files $uri /index.php$request_uri;
|
|
expires 7d; # Cache-Control policy borrowed from `.htaccess`
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.php$request_uri;
|
|
}
|
|
}
|
|
}
|