-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
67 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# default config for single-page apps | ||
server { | ||
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)$ { | ||
# Very short caching time to ensure changes are immediately recognized | ||
expires 5m; | ||
} | ||
|
||
location / { | ||
try_files $uri $uri/ /index.html =404; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
server { | ||
listen 8080; | ||
root /usr/share/nginx/html; | ||
|
||
location / { | ||
autoindex on; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,29 @@ | ||
user www www; ## Default: nobody | ||
worker_processes 5; ## Default: 1 | ||
error_log logs/error.log; | ||
pid /tmp/nginx.pid; | ||
worker_rlimit_nofile 8192; | ||
worker_processes 1; | ||
|
||
error_log /var/log/nginx/error.log warn; | ||
pid /var/cache/nginx/nginx.pid; | ||
|
||
events { | ||
worker_connections 4096; ## Default: 1024 | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
index index.html index.htm index.php; | ||
|
||
client_body_temp_path /tmp/client_temp; | ||
proxy_temp_path /tmp/proxy_temp_path; | ||
fastcgi_temp_path /tmp/fastcgi_temp; | ||
uwsgi_temp_path /tmp/uwsgi_temp; | ||
scgi_temp_path /tmp/scgi_temp; | ||
|
||
default_type application/octet-stream; | ||
log_format main '$remote_addr - $remote_user [$time_local] $status ' | ||
'"$request" $body_bytes_sent "$http_referer" ' | ||
'"$http_user_agent" "$http_x_forwarded_for"'; | ||
access_log logs/access.log main; | ||
sendfile on; | ||
tcp_nopush on; | ||
server_names_hash_bucket_size 128; # this seems to be required for some vhosts | ||
|
||
server { | ||
listen 8080;server_name localhost; | ||
location / { | ||
root /usr/share/nginx/html; | ||
index index.html; | ||
try_files $uri $uri/ /index.html; | ||
} | ||
} | ||
} | ||
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"; | ||
|
||
access_log off; | ||
|
||
sendfile on; | ||
|
||
keepalive_timeout 65; | ||
|
||
gzip on; | ||
gzip_static on; | ||
gzip_types text/plain text/css text/javascript application/javascript application/xml application/pdf image/svg+xml; | ||
|
||
include /etc/nginx/conf.d/default.conf; | ||
} |