Initial commit - QBPOS Help
This commit is contained in:
62
config/nginx_setup.conf
Normal file
62
config/nginx_setup.conf
Normal file
@@ -0,0 +1,62 @@
|
||||
# Nginx Configuration for QuickBooks POS Help Documentation
|
||||
# For production deployment with 100,000+ users
|
||||
#
|
||||
# Installation:
|
||||
# 1. sudo apt install nginx
|
||||
# 2. sudo cp nginx_setup.conf /etc/nginx/sites-available/qbpos-help
|
||||
# 3. sudo ln -s /etc/nginx/sites-available/qbpos-help /etc/nginx/sites-enabled/
|
||||
# 4. sudo nginx -t
|
||||
# 5. sudo systemctl restart nginx
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
server_name your-domain.com; # Change to your domain or IP
|
||||
|
||||
root /home/pts/Documents/QBPOS_Help_Web/QB_Help_Web;
|
||||
index POS_Help.html;
|
||||
|
||||
# Access and error logs (minimal logging)
|
||||
access_log /var/log/nginx/qbpos-access.log combined buffer=32k;
|
||||
error_log /var/log/nginx/qbpos-error.log warn;
|
||||
|
||||
# Gzip compression for text files
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_min_length 1024;
|
||||
gzip_types text/plain text/css text/xml text/javascript
|
||||
application/x-javascript application/xml+rss
|
||||
application/javascript application/json;
|
||||
|
||||
# Static asset caching (1 year for images, icons)
|
||||
location ~* \.(gif|jpg|jpeg|png|ico|css|js)$ {
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
access_log off; # Don't log static files
|
||||
}
|
||||
|
||||
# HTML files cache for 1 hour
|
||||
location ~* \.(html|htm)$ {
|
||||
expires 1h;
|
||||
add_header Cache-Control "public, must-revalidate";
|
||||
}
|
||||
|
||||
# Main location
|
||||
location / {
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
|
||||
# Security headers
|
||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
add_header X-XSS-Protection "1; mode=block" always;
|
||||
|
||||
# Connection optimizations for high traffic
|
||||
keepalive_timeout 65;
|
||||
keepalive_requests 100;
|
||||
|
||||
# Rate limiting (optional - uncomment to limit requests)
|
||||
# limit_req_zone $binary_remote_addr zone=qbpos_limit:10m rate=10r/s;
|
||||
# limit_req zone=qbpos_limit burst=20 nodelay;
|
||||
}
|
||||
Reference in New Issue
Block a user