github.com/deemoprobe/k8s-first-commit@v0.0.0-20230430165612-a541f1982be3/src/saltbase/salt/nginx/kubernetes-site (about)

     1  #server {
     2  	#listen   80; ## listen for ipv4; this line is default and implied
     3  	#listen   [::]:80 default_server ipv6only=on; ## listen for ipv6
     4  
     5  #	root /usr/share/nginx/www;
     6  #	index index.html index.htm;
     7  
     8  	# Make site accessible from http://localhost/
     9  #	server_name localhost;
    10  #       location / {
    11  #         auth_basic            "Restricted";
    12  #          auth_basic_user_file  /usr/share/nginx/htpasswd;
    13  
    14            # Proxy settings.
    15  #          proxy_pass http://localhost:8080/;
    16  #          proxy_connect_timeout 159s;
    17  #          proxy_send_timeout   600s;
    18  #          proxy_read_timeout   600s;
    19  #          proxy_buffer_size    64k;
    20  #          proxy_buffers     16 32k;
    21  #          proxy_busy_buffers_size 64k;
    22  #          proxy_temp_file_write_size 64k;
    23  #        }
    24  #}
    25  
    26  # HTTPS server
    27  #
    28  server {
    29          listen 443;
    30          server_name localhost;
    31  
    32          root html;
    33          index index.html index.htm;
    34  
    35          ssl on;
    36          ssl_certificate /usr/share/nginx/server.cert;
    37          ssl_certificate_key /usr/share/nginx/server.key;
    38  
    39          ssl_session_timeout 5m;
    40  
    41          ssl_protocols SSLv3 TLSv1;
    42          ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
    43          ssl_prefer_server_ciphers on;
    44  
    45          location / {
    46            auth_basic            "Restricted";
    47            auth_basic_user_file  /usr/share/nginx/htpasswd;
    48  
    49            # Proxy settings
    50            proxy_pass http://localhost:8080/;
    51            proxy_connect_timeout 159s;
    52            proxy_send_timeout   600s;
    53            proxy_read_timeout   600s;
    54            proxy_buffer_size    64k;
    55            proxy_buffers     16 32k;
    56            proxy_busy_buffers_size 64k;
    57            proxy_temp_file_write_size 64k;
    58          }
    59          location /etcd/ {
    60            auth_basic            "Restricted";
    61            auth_basic_user_file  /usr/share/nginx/htpasswd;
    62  
    63            # Proxy settings
    64            proxy_pass http://localhost:4001/;
    65            proxy_connect_timeout 159s;
    66            proxy_send_timeout   600s;
    67            proxy_read_timeout   600s;
    68            proxy_buffer_size    64k;
    69            proxy_buffers     16 32k;
    70            proxy_busy_buffers_size 64k;
    71            proxy_temp_file_write_size 64k;
    72          }
    73  }