Skip to content

Instantly share code, notes, and snippets.

@flayder
Created April 16, 2019 07:42
Show Gist options
  • Save flayder/9a34c62a8a83ecf3500dba69d1a30722 to your computer and use it in GitHub Desktop.
Save flayder/9a34c62a8a83ecf3500dba69d1a30722 to your computer and use it in GitHub Desktop.
user apache;
worker_processes auto;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
multi_accept on;
}
http {
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log /var/log/nginx/access.log main;
include /etc/nginx/conf.d/*.conf;
access_log off;
server_tokens off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
reset_timedout_connection on;
client_header_timeout 15;
client_body_timeout 30;
send_timeout 15;
keepalive_timeout 5;
keepalive_requests 30;
#client_max_body_size 8m;
limit_rate_after 30M;
limit_rate 500K;
open_file_cache max=10000 inactive=3m;
open_file_cache_min_uses 2;
open_file_cache_valid 1m;
sendfile on;
tcp_nodelay on;
tcp_nopush on;
#gzip on;
server {
listen 443 ssl;
keepalive_timeout 70;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers AES128-SHA:AES256-SHA:RC4-SHA:DES-CBC3-SHA:RC4-MD5;
ssl_certificate /var/www/httpd-cert/nikastal/nikastal.ru_le1.crt;
ssl_certificate_key /var/www/httpd-cert/nikastal/nikastal.ru_le1.key;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
root /var/www/nikastal/data/www/nikastal.ru;
server_name nikastal.ru www.nikastal.ru;
#access_log /var/www/nikastal/data/www/logs/nginx_access.log;
error_log /var/www/nikastal/data/www/logs/nginx_error.log;
#index index.php;
location / {
proxy_pass https://127.0.0.1:8080/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location ~* \.(css|js|png|gif|jpg|jpeg|ico)$ {
root /var/www/nikastal/data/www/nikastal.ru/;
expires 1d;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment