Skip to content

Instantly share code, notes, and snippets.

@ZeroPivot

ZeroPivot/nginx.conf

Last active Jan 3, 2021
Embed
What would you like to do?
Configuration for use with Puma and Nginx
user root;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
#multi_accept on;
}
http {
upstream app { server unix://root/comicman-remote-modular/config/puma.sock; }
server {
server_name domain.net www.domain.net;
root /root/app_location/public;
location / {
proxy_pass http://app;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwaeded-Host 'domain.net';
proxy_set_header X-Forwarded-Proto $scheme;
}
#error_page 500 502 503 504 /500.html;
#error_page 404 /404.html;
client_max_body_size 4G;
keepalive_timeout 60;
}
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# SSL Settings
##
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
server {
listen 80;
listen [::]:80;
server_name domain.net www.domain.net;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment