github.com/argoproj/argo-cd/v2@v2.10.5/test/fixture/testrepos/nginx.conf (about)

     1  error_log /dev/stdout info;
     2  worker_processes 1;
     3  
     4  events { worker_connections 1024; }
     5  
     6  http {
     7  
     8     server {
     9      listen  0.0.0.0:9081;
    10  
    11      root /tmp/argo-e2e;
    12  
    13      location ~ ^/helm-repo/(.*) {
    14        # Set chunks to unlimited, as the body's can be huge
    15        client_max_body_size			0;
    16        alias /app/config/testdata/helm-repo/$1;
    17      }
    18  
    19      location ~ /argo-e2e/testdata.git/helm-repo/(.*) {
    20        # Set chunks to unlimited, as the body's can be huge
    21        client_max_body_size			0;
    22  
    23        alias /tmp/argo-e2e/testdata.git/helm-repo/$1;
    24      }
    25   
    26      location ~ /argo-e2e(/.*) {
    27        # Set chunks to unlimited, as the body's can be huge
    28    	  client_max_body_size			0;
    29  
    30    	  fastcgi_param	SCRIPT_FILENAME		/usr/lib/git-core/git-http-backend;
    31    	  include		/etc/nginx/fastcgi_params;
    32    	  fastcgi_param	GIT_HTTP_EXPORT_ALL	"";
    33    	  fastcgi_param	GIT_PROJECT_ROOT	/tmp/argo-e2e;
    34    	  fastcgi_param	PATH_INFO		$1;
    35      	
    36    	  # Hard-coded credentials for Git in this case
    37    	  fastcgi_param	REMOTE_USER		"admin";
    38    	  fastcgi_pass	unix:/var/run/fcgiwrap.socket;
    39      }
    40    }
    41    
    42    server {
    43      listen 9080;
    44      listen  0.0.0.0:9443 ssl http2;
    45  
    46      auth_basic            "Restricted";
    47      auth_basic_user_file  .htpasswd;
    48      root /tmp/argo-e2e;
    49  
    50      ssl_certificate ../certs/argocd-test-server.crt;
    51      ssl_certificate_key ../certs/argocd-test-server.key;
    52      ssl_protocols TLSv1.2 TLSv1.1 TLSv1;
    53  
    54      location ~ /argo-e2e/testdata.git/helm-repo(/.*) {
    55        # Set chunks to unlimited, as the body's can be huge
    56        client_max_body_size			0;
    57  
    58        root /tmp/;
    59      }
    60  
    61      location ~ /helm-repo/(.*) {
    62        # Set chunks to unlimited, as the body's can be huge
    63        client_max_body_size			0;
    64        alias /app/config/testdata/helm-repo/$1;
    65      }
    66   
    67      location ~ /argo-e2e/testdata.git/helm-repo/(.*) {
    68        # Set chunks to unlimited, as the body's can be huge
    69        client_max_body_size			0;
    70  
    71        alias /tmp/argo-e2e/testdata.git/helm-repo/$1;
    72      }
    73   
    74      location ~ /argo-e2e(/.*) {
    75        # Set chunks to unlimited, as the body's can be huge
    76    	  client_max_body_size			0;
    77  
    78    	  fastcgi_param	SCRIPT_FILENAME		/usr/lib/git-core/git-http-backend;
    79    	  include		/etc/nginx/fastcgi_params;
    80    	  fastcgi_param	GIT_HTTP_EXPORT_ALL	"";
    81    	  fastcgi_param	GIT_PROJECT_ROOT	/tmp/argo-e2e;
    82    	  fastcgi_param	PATH_INFO		$1;
    83      	
    84    	  # Forward REMOTE_USER as we want to know when we are authenticated
    85    	  fastcgi_param	REMOTE_USER		$remote_user;
    86    	  fastcgi_pass	unix:/var/run/fcgiwrap.socket;
    87      }
    88    }
    89  
    90    # server block for strict verification of client certs
    91    server {
    92      listen  0.0.0.0:9444 ssl http2;
    93  
    94      auth_basic            "Restricted";
    95      auth_basic_user_file  .htpasswd;
    96      root /tmp/argo-e2e;
    97  
    98      ssl_certificate ../certs/argocd-test-server.crt;
    99      ssl_certificate_key ../certs/argocd-test-server.key;
   100      ssl_client_certificate ../certs/argocd-test-ca.crt;
   101      ssl_verify_client on;
   102      ssl_protocols TLSv1.2 TLSv1.1 TLSv1;
   103  
   104      # /helm-repo is used by cluster-e2e tests only
   105      location ~ ^/helm-repo/(.*) {
   106        client_max_body_size			0;
   107        alias /app/config/testdata/helm-repo/$1;
   108      }
   109   
   110      location ~ /argo-e2e/testdata.git/helm-repo/(.*) {
   111        # Set chunks to unlimited, as the body's can be huge
   112        client_max_body_size			0;
   113  
   114        alias /tmp/argo-e2e/testdata.git/helm-repo/$1;
   115      }
   116     
   117      location ~ /argo-e2e(/.*) {
   118        # Set chunks to unlimited, as the body's can be huge
   119    	  client_max_body_size			0;
   120  
   121    	  fastcgi_param	SCRIPT_FILENAME		/usr/lib/git-core/git-http-backend;
   122    	  include		/etc/nginx/fastcgi_params;
   123    	  fastcgi_param	GIT_HTTP_EXPORT_ALL	"";
   124    	  fastcgi_param	GIT_PROJECT_ROOT	/tmp/argo-e2e;
   125    	  fastcgi_param	PATH_INFO		$1;
   126      	
   127    	  # Forward REMOTE_USER as we want to know when we are authenticated
   128    	  fastcgi_param	REMOTE_USER		$remote_user;
   129    	  fastcgi_pass	unix:/var/run/fcgiwrap.socket;
   130      }
   131  
   132    }
   133  }