Fossil SCM

Document how to add HTTPS=on for the case where Fossil is used in CGI mode with Apache behind Nginx.

danield 2021-11-17 15:49 trunk
Commit cd934131f8ab95fbf9953641146c8805c448e9e8673fc84f5bf0b47a90038d69
1 file changed +19
--- www/server/any/cgi.md
+++ www/server/any/cgi.md
@@ -68,6 +68,25 @@
6868
exists.
6969
7070
Additional options available to the CGI script are [documented
7171
separately](../../cgi.wiki).
7272
73
+#### CGI with Apache behind an Nginx proxy
74
+
75
+For the case where the Fossil repositories live on a computer, itself behind
76
+an Internet-facing machine that employs Nginx to reverse proxy HTTP(S) requests
77
+and take care of the TLS part of the connections in a transparent manner for
78
+the downstream web servers, the CGI parameter `HTTPS=on` might not be set.
79
+However, Fossil in CGI mode needs it in order to generate the correct links.
80
+
81
+Apache can be instructed to pass this parameter further to the CGI scripts for
82
+TLS connections with a stanza like
83
+
84
+ SetEnvIf X-Forwarded-Proto "https" HTTPS=on
85
+
86
+in its config file section for CGI, provided that
87
+
88
+ proxy_set_header X-Forwarded-Proto $scheme;
89
+
90
+has been be added in the relevant proxying section of the Nginx config file.
91
+
7392
*[Return to the top-level Fossil server article.](../)*
7493
--- www/server/any/cgi.md
+++ www/server/any/cgi.md
@@ -68,6 +68,25 @@
68 exists.
69
70 Additional options available to the CGI script are [documented
71 separately](../../cgi.wiki).
72
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73 *[Return to the top-level Fossil server article.](../)*
74
--- www/server/any/cgi.md
+++ www/server/any/cgi.md
@@ -68,6 +68,25 @@
68 exists.
69
70 Additional options available to the CGI script are [documented
71 separately](../../cgi.wiki).
72
73 #### CGI with Apache behind an Nginx proxy
74
75 For the case where the Fossil repositories live on a computer, itself behind
76 an Internet-facing machine that employs Nginx to reverse proxy HTTP(S) requests
77 and take care of the TLS part of the connections in a transparent manner for
78 the downstream web servers, the CGI parameter `HTTPS=on` might not be set.
79 However, Fossil in CGI mode needs it in order to generate the correct links.
80
81 Apache can be instructed to pass this parameter further to the CGI scripts for
82 TLS connections with a stanza like
83
84 SetEnvIf X-Forwarded-Proto "https" HTTPS=on
85
86 in its config file section for CGI, provided that
87
88 proxy_set_header X-Forwarded-Proto $scheme;
89
90 has been be added in the relevant proxying section of the Nginx config file.
91
92 *[Return to the top-level Fossil server article.](../)*
93

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button