Skip to content

Commit

Permalink
chore: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dweber019 committed Oct 19, 2023
1 parent 6bd474e commit 19263c1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
8 changes: 4 additions & 4 deletions nginx/default.conf
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# default config for single-page apps
server {
listen 8080;
root /usr/share/nginx/html;
listen 8080;
root /usr/share/nginx/html;

location ~ ^/(css|js)/ {
# These assets include a unique hash in the filename, so they will never change
expires max;
}

location ~* ^.+\.(html]htm)$ {
location ~* ^.+\.(html|htm)$ {
# Very short caching time to ensure changes are immediately recognized
expires 5m;
}

location / {
try_files $uri $uri/ /index.html =404;
}
}
}
6 changes: 3 additions & 3 deletions nginx/file-browser.conf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
server {
listen 8080;
root /usr/share/nginx/html;
listen 8080;
root /usr/share/nginx/html;

location / {
autoindex on;
}
}
}
22 changes: 12 additions & 10 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
worker_processes 1;
worker_processes 1;

error_log /var/log/nginx/error.log warn;
pid /var/cache/nginx/nginx.pid;

error_log /var/log/nginx/error.log warn;
pid /var/cache/nginx/nginx.pid;

events {
worker_connections 1024;
worker_connections 1024;
}


http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_X_forwarded_for"';
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log off;

Expand All @@ -26,4 +28,4 @@ http {
gzip_types text/plain text/css text/javascript application/javascript application/xml application/pdf image/svg+xml;

include /etc/nginx/conf.d/default.conf;
}

0 comments on commit 19263c1

Please sign in to comment.