Skip to content

Commit

Permalink
nginx.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
morya committed Apr 28, 2024
1 parent a5c1985 commit 561f3e7
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions nginx.conf
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;
}
}
}

0 comments on commit 561f3e7

Please sign in to comment.