2022-09-03 03:11:11 +02:00
====== nginx ======
nginx (ausgesprochen "engine X") ist ein freier, quelloffener, hochleistungsfähiger HTTP-Server und Reverse-Proxy sowie ein IMAP/POP3-Proxyserver, der 2005 von Igor Sysoev entwickelt wurde. nginx ist bekannt für seine Stabilität, seinen großen Funktionsumfang, seine einfache Konfiguration und seinen geringen Ressourcenverbrauch.
2023-01-06 19:51:41 +01:00
Siehe auch [[/de/server/services/ssl|ssl]].
2022-09-03 03:11:11 +02:00
===== Paket =====
<code>
pacman -S nginx
</code>
===== Konfiguration =====
<code>
2023-01-06 19:52:47 +01:00
mkdir /etc/nginx/{sites-enabled,sites-available,conf.d}
2022-09-03 03:11:11 +02:00
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>
===== Start =====
<code>
systemctl enable --now nginx.service
</code>