build & deploy with docker
This commit is contained in:
43
nginx/nginx.conf
Normal file
43
nginx/nginx.conf
Normal file
@@ -0,0 +1,43 @@
|
||||
# nginx.conf
|
||||
worker_processes auto;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
# Logging
|
||||
access_log /var/log/nginx/access.log;
|
||||
error_log /var/log/nginx/error.log;
|
||||
|
||||
# Gzip compression
|
||||
gzip on;
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
gzip_min_length 256;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name example.com;
|
||||
|
||||
root /var/www/;
|
||||
index index.html;
|
||||
|
||||
# Error pages
|
||||
#error_page 404 /404.html;
|
||||
#location = /404.html {
|
||||
# internal;
|
||||
#}
|
||||
|
||||
# Serve static files
|
||||
location / {
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
|
||||
# Optional: Caching for static assets
|
||||
location ~* \.(?:ico|css|js|gif|jpe?g|png|svg|woff2?|ttf|otf|eot|html|xml|json)$ {
|
||||
expires 10M;
|
||||
access_log off;
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user