Skip to content

Instantly share code, notes, and snippets.

@snaga
Created April 17, 2022 02:17
Show Gist options
  • Select an option

  • Save snaga/93fc99097b439aee05eb503a218f450c to your computer and use it in GitHub Desktop.

Select an option

Save snaga/93fc99097b439aee05eb503a218f450c to your computer and use it in GitHub Desktop.

Revisions

  1. snaga created this gist Apr 17, 2022.
    48 changes: 48 additions & 0 deletions nginx.conf.diff
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,48 @@
    *** nginx.conf.orig 2022-04-17 01:50:37.192213186 +0000
    --- nginx.conf 2022-04-17 02:14:05.153078648 +0000
    ***************
    *** 36,43 ****
    include /etc/nginx/conf.d/*.conf;

    server {
    ! listen 80;
    ! listen [::]:80;
    server_name _;
    root /usr/share/nginx/html;

    --- 36,43 ----
    include /etc/nginx/conf.d/*.conf;

    server {
    ! listen 8080;
    ! listen [::]:8080;
    server_name _;
    root /usr/share/nginx/html;

    ***************
    *** 53,58 ****
    --- 53,76 ----
    }
    }

    + server {
    + listen 80;
    + listen [::]:80;
    + server_name _;
    +
    + # Load configuration files for the default server block.
    + include /etc/nginx/default.d/*.conf;
    +
    + location = / {
    + proxy_pass http://127.0.0.1:8080;
    +
    + auth_basic "auth test";
    + auth_basic_user_file /etc/nginx/.htpasswd;
    +
    + add_header Set-Cookie remote_user=$remote_user;
    + }
    + }
    +
    # Settings for a TLS enabled server.
    #
    # server {