-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginx.conf
More file actions
71 lines (54 loc) · 1.96 KB
/
Copy pathnginx.conf
File metadata and controls
71 lines (54 loc) · 1.96 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
62
63
64
65
66
67
68
69
70
71
worker_processes auto;
events {
worker_connections 2048;
}
http {
include mime.types;
default_type application/octet-stream;
server_tokens off;
# Logging Configuration
access_log /dev/stdout;
error_log /dev/stderr crit;
# Uncomment the following lines to disable logging
# access_log /dev/null;
# error_log /dev/null crit;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
# Gzip Compression
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
server {
listen 80;
server_name localhost;
# Root Directory
root /usr/share/nginx/html;
index index.html;
# Main Location Block
location / {
try_files $uri $uri/ =404;
# Uncomment the following lines to disable browser caching
# add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0";
# add_header Pragma "no-cache";
# add_header Expires "0";
}
# Custom 404 Page
# Uncomment and customize the following lines to provide a custom 404 page
# error_page 404 /custom_404.html;
# location = /custom_404.html {
# internal;
# root /usr/share/nginx/html;
# }
# Additional Useful Parameters
# Enable CORS (Cross-Origin Resource Sharing)
# add_header 'Access-Control-Allow-Origin' '*' always;
# add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
# add_header 'Access-Control-Allow-Headers' 'Origin, Content-Type, Accept, Authorization' always;
# Disable ETags
# etag off;
# Add Security Headers
# add_header X-Content-Type-Options nosniff;
# add_header X-Frame-Options DENY;
# add_header X-XSS-Protection "1; mode=block";
}
}