Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial optimized nginx configs #8

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions conf/nginx/optimized/html
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
worker_processes auto; # default 1
error_log stderr error; # default to logs/error.log

keepalive_requests 10000;

events {
use epoll;
worker_connections 1024;
#use epoll; by default use the best option
worker_connections 2500; # default 512
}

worker_processes auto;

http {
access_log off;
sendfile on;
proxy_cache_path /tmp/nginx-cache keys_zone=cache:10m;

server {
listen 0.0.0.0:8080;
proxy_cache cache;

location / {
alias /srv/static/;
}
}
}
16 changes: 9 additions & 7 deletions conf/nginx/optimized/proxy
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
worker_processes auto; # default 1
error_log stderr error; # default to logs/error.log

keepalive_requests 10000;

events {
use epoll;
worker_connections 1024;
#use epoll; by default use the best option
worker_connections 2500; # default 512
}

worker_processes auto;

http {
access_log off;
sendfile on;
proxy_cache_path /tmp/nginx-cache keys_zone=cache:10m;

server {
listen 0.0.0.0:8080;
proxy_cache cache;

location / {
proxy_pass http://127.0.0.1:8081;
proxy_http_version 1.1;
proxy_set_header Connection "";
}
}
}
14 changes: 7 additions & 7 deletions conf/nginx/optimized/synthetic
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
worker_processes auto; # default 1
error_log stderr error; # default to logs/error.log

keepalive_requests 10000;

events {
use epoll;
worker_connections 1024;
#use epoll; # by default use the best option
worker_connections 2500; # default 512
}

worker_processes auto;

http {
access_log off;
sendfile on;
proxy_cache_path /tmp/nginx-cache keys_zone=cache:10m;

server {
listen 0.0.0.0:8080;
proxy_cache cache;

return 200 "Hello, world!";
}
Expand Down