Přeskočit na obsah
_CORE
AI & Agentic Systems Core Informační Systémy Cloud & Platform Engineering Data Platforma & Integrace Security & Compliance QA, Testing & Observability IoT, Automatizace & Robotika Mobile & Digital Banky & Finance Pojišťovnictví Veřejná správa Obrana & Bezpečnost Zdravotnictví Energetika & Utility Telco & Média Průmysl & Výroba Logistika & E-commerce Retail & Loyalty
Reference Technologie Blog Know-how Nástroje
O nás Spolupráce Kariéra
Pojďme to probrat

Nginx konfigurace od nuly

04. 04. 2018 1 min čtení beginner

Nginx je nejpopulárnější web server. Event-driven architektura zvládá tisíce spojení.

Instalace

sudo apt install nginx sudo systemctl enable –now nginx

Virtual host

server { listen 80; server_name myapp.example.com; root /var/www/myapp; location /static/ { expires 30d; } location / { try_files $uri $uri/ /index.html; } } ln -s /etc/nginx/sites-available/myapp.conf /etc/nginx/sites-enabled/ nginx -t && systemctl reload nginx

Performance

worker_processes auto; events { worker_connections 4096; use epoll; } http { sendfile on; tcp_nopush on; gzip on; }

Security

add_header X-Content-Type-Options nosniff; add_header X-Frame-Options SAMEORIGIN; add_header Strict-Transport-Security “max-age=31536000” always;

Nginx je standard

Výchozí volba pro web serving i reverse proxy.

nginxweb serverkonfigurace
Sdílet:

CORE SYSTEMS tým

Stavíme core systémy a AI agenty, které drží provoz. 15 let zkušeností s enterprise IT.