Wiki page nginx changed with summary [created] by Daniel
This commit is contained in:
parent
d4163158a5
commit
2968850de2
1 changed files with 56 additions and 0 deletions
56
pages/en/server/services/nginx.txt
Normal file
56
pages/en/server/services/nginx.txt
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
====== nginx ======
|
||||||
|
|
||||||
|
nginx (pronounced "engine X"), is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server, written by Igor Sysoev in 2005. nginx is well known for its stability, rich feature set, simple configuration, and low resource consumption.
|
||||||
|
|
||||||
|
===== Package =====
|
||||||
|
|
||||||
|
<code>
|
||||||
|
pacman -S nginx
|
||||||
|
</code>
|
||||||
|
|
||||||
|
===== Start =====
|
||||||
|
|
||||||
|
<code>
|
||||||
|
systemctl enable --now nginx.service
|
||||||
|
</code>
|
||||||
|
|
||||||
|
===== Configuration =====
|
||||||
|
|
||||||
|
<code>
|
||||||
|
mkdir /etc/nginx/{sites-enabled,sites-available}
|
||||||
|
cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.original
|
||||||
|
nano /etc/nginx/nginx.conf
|
||||||
|
</code>
|
||||||
|
<code>
|
||||||
|
user http;
|
||||||
|
worker_processes auto;
|
||||||
|
worker_cpu_affinity auto;
|
||||||
|
|
||||||
|
events {
|
||||||
|
multi_accept on;
|
||||||
|
worker_connections 1024;
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
charset utf-8;
|
||||||
|
sendfile on;
|
||||||
|
tcp_nopush on;
|
||||||
|
tcp_nodelay on;
|
||||||
|
server_tokens off;
|
||||||
|
log_not_found off;
|
||||||
|
types_hash_max_size 4096;
|
||||||
|
client_max_body_size 16M;
|
||||||
|
|
||||||
|
# MIME
|
||||||
|
include mime.types;
|
||||||
|
default_type application/octet-stream;
|
||||||
|
|
||||||
|
# logging
|
||||||
|
access_log /var/log/nginx/access.log;
|
||||||
|
error_log /var/log/nginx/error.log warn;
|
||||||
|
|
||||||
|
# load configs
|
||||||
|
include /etc/nginx/conf.d/*.conf;
|
||||||
|
include /etc/nginx/sites-enabled/*;
|
||||||
|
}
|
||||||
|
</code>
|
Loading…
Reference in a new issue