Skip to content
_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN DE
Let's talk

Nginx Configuration from Scratch

04. 04. 2018 1 min read beginner

Nginx is the most popular web server. Its event-driven architecture handles thousands of connections efficiently.

Installation

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 Is the Standard

The default choice for web serving and reverse proxy.

nginxweb serverkonfigurace
Share:

CORE SYSTEMS team

We build core systems and AI agents that keep operations running. 15 years of experience with enterprise IT.