forked from icydresden/backend-v2
-
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
1 changed file
with
51 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
user nginx; | ||
worker_processes 1; | ||
|
||
error_log /var/log/nginx/error.log warn; | ||
pid /var/run/nginx.pid; | ||
|
||
events { | ||
worker_connections 8192; | ||
} | ||
|
||
|
||
http { | ||
server_tokens off; | ||
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 ngjsonlog escape=json '{"@timestamp":"$time_iso8601","remote":"$remote_addr","xip":"$http_x_connecting_ip","xff":"$http_x_forwarded_for","req":"$request_uri",' | ||
'"status":$status,"token":"$http_authorization","bodysize":$body_bytes_sent,"ref":"$http_referer","php-ua":"$http_user_agent",' | ||
'"php-hostaddr":"$host"}'; | ||
|
||
access_log /dev/stdout ngjsonlog; | ||
|
||
sendfile on; | ||
#tcp_nopush on; | ||
|
||
keepalive_timeout 65; | ||
|
||
gzip on; | ||
|
||
server { | ||
listen 80 default; | ||
server_name _; | ||
access_log /dev/stdout main; | ||
error_log /dev/stderr warn; | ||
|
||
root /var/www; | ||
|
||
expires 2d; | ||
|
||
location / { | ||
add_header Access-Control-Allow-Origin *; | ||
add_header LIVE_STATIC_NG_HOST $hostname; | ||
|
||
index index.html; | ||
try_files $uri $uri/ /index.html; | ||
} | ||
} | ||
} |