Add Gerrit behind reverse-proxy
diff --git a/nginx/sa.conf b/nginx/sa.conf
index de91126..2bef474 100644
--- a/nginx/sa.conf
+++ b/nginx/sa.conf
@@ -8,6 +8,24 @@
server {
listen 443 ssl;
listen [::]:443 ssl;
+
+ server_name id.miau.local;
+
+ root /var/www/html;
+ location / {
+ index index.php index.html;
+ }
+ location ~ \.php$ {
+ include fastcgi_params;
+ fastcgi_pass simpleid:9000;
+ fastcgi_index index.php;
+ fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
+ }
+}
+
+server {
+ listen 443 ssl default_server;
+ listen [::]:443 ssl default_server;
ssl_certificate /etc/ssl/certs/sa-selfsigned.crt;
ssl_certificate_key /etc/ssl/private/sa-selfsigned.key;
ssl_protocols TLSv1.3;
@@ -29,16 +47,11 @@
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
- server_name id.miau.local;
+ server_name review.miau.local;
- root /var/www/html;
location / {
- index index.php index.html;
- }
- location ~ \.php$ {
- include fastcgi_params;
- fastcgi_pass simpleid:9000;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
+ proxy_pass http://gerrit:8080;
+ proxy_set_header X-Forwarded-For $remote_addr;
+ proxy_set_header Host $host;
}
}