nginx/files/nginx.conf
author Luke Hoersten <luke@hoersten.org>
Sat, 10 Feb 2024 15:40:23 -0600
changeset 228 ff776d663062
parent 47 3f1771bb0d79
permissions -rw-r--r--
Added pastebin bin role.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
47
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     1
user www-data;
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     2
worker_processes auto;
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     3
pid /run/nginx.pid;
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     4
include /etc/nginx/modules-enabled/*.conf;
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     5
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     6
events {
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     7
        worker_connections 768;
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     8
        # multi_accept on;
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     9
}
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    10
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    11
http {
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    12
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    13
        ##
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    14
        # Basic Settings
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    15
        ##
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    16
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    17
        sendfile on;
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    18
        tcp_nopush on;
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    19
        tcp_nodelay on;
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    20
        keepalive_timeout 65;
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    21
        types_hash_max_size 2048;
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    22
        # server_tokens off;
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    23
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    24
        # server_names_hash_bucket_size 64;
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    25
        # server_name_in_redirect off;
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    26
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    27
        include /etc/nginx/mime.types;
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    28
        default_type application/octet-stream;
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    29
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    30
        ##
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    31
        # SSL Settings
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    32
        ##
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    33
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    34
        ssl_protocols TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    35
        ssl_prefer_server_ciphers on;
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    36
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    37
        ##
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    38
        # Logging Settings
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    39
        ##
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    40
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    41
        access_log /var/log/nginx/access.log;
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    42
        error_log /var/log/nginx/error.log;
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    43
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    44
        ##
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    45
        # Gzip Settings
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    46
        ##
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    47
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    48
        gzip on;
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    49
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    50
        gzip_vary on;
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    51
        gzip_proxied any;
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    52
        gzip_comp_level 6;
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    53
        gzip_buffers 16 8k;
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    54
        gzip_http_version 1.1;
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    55
        gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    56
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    57
        ##
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    58
        # Virtual Host Configs
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    59
        ##
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    60
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    61
        include /etc/nginx/conf.d/*.conf;
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    62
        include /etc/nginx/sites-enabled/*;
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    63
}
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    64
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    65
stream {
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    66
        ssl_protocols TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    67
        ssl_prefer_server_ciphers on;
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    68
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    69
        include /etc/nginx/streams-enabled/*;
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    70
}
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    71
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    72
#mail {
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    73
#	# See sample authentication script at:
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    74
#	# http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    75
#
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    76
#	# auth_http localhost/auth.php;
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    77
#	# pop3_capabilities "TOP" "USER";
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    78
#	# imap_capabilities "IMAP4rev1" "UIDPLUS";
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    79
#
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    80
#	server {
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    81
#		listen     localhost:110;
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    82
#		protocol   pop3;
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    83
#		proxy      on;
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    84
#	}
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    85
#
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    86
#	server {
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    87
#		listen     localhost:143;
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    88
#		protocol   imap;
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    89
#		proxy      on;
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    90
#	}
3f1771bb0d79 Added stream support to nginx configs.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    91
#}