Update theme

This commit is contained in:
Digital Studium
2023-05-19 12:47:46 +03:00
parent 38638700f0
commit e64276f338
7 changed files with 20 additions and 13 deletions

View File

@@ -4,8 +4,7 @@ category: nginx-lifehacks
filename: nginx-configs-examples
date: 2023-03-26
---
Sometimes there is a need to quickly create an nginx configuration file: for hosting a static website,
to create a simple proxy server, etc.
Sometimes there is a need to quickly create an nginx configuration file: for hosting a static website, for proxying requests to upstream server, etc.
This article provides simple examples of Nginx configs for different purposes.
@@ -47,7 +46,7 @@ server {
listen 80;
server_name example.com www.example.com;
access_log /var/log/nginx/example.com.log main;
access_log /var/log/nginx/example.com.log;
location / {
proxy_pass http://127.0.0.1:5000;
@@ -77,7 +76,7 @@ server {
listen 80;
server_name example.com www.example.com;
access_log /var/log/nginx/example.com.log main;
access_log /var/log/nginx/example.com.log;
location / {
proxy_pass http://1.2.3.4;
proxy_set_header Host $host;

View File

@@ -4,8 +4,7 @@ category: nginx-lifehacks
filename: nginx-configs-examples
date: 2023-03-26
---
Иногда возникает потребность быстро создать конфигурационный файл nginx: для хостинга статического вебсайта,
для создания простого проксирующего сервера и т. п.
Иногда возникает потребность быстро создать конфигурационный файл nginx: для хостинга статического вебсайта, для проксирования запросов к какому-либо серверу и т. п.
В данной статье приведены простые примеры конфигов Nginx для разных целей.
@@ -47,7 +46,7 @@ server {
listen 80;
server_name example.com www.example.com;
access_log /var/log/nginx/example.com.log main;
access_log /var/log/nginx/example.com.log;
location / {
proxy_pass http://127.0.0.1:5000;
@@ -77,7 +76,7 @@ server {
listen 80;
server_name example.com www.example.com;
access_log /var/log/nginx/example.com.log main;
access_log /var/log/nginx/example.com.log;
location / {
proxy_pass http://1.2.3.4;
proxy_set_header Host $host;