Fossil SCM
Document how to add HTTPS=on for the case where Fossil is used in CGI mode with Apache behind Nginx.
Commit
cd934131f8ab95fbf9953641146c8805c448e9e8673fc84f5bf0b47a90038d69
Parent
14f44e933c0c0c2…
1 file changed
+19
+19
| --- www/server/any/cgi.md | ||
| +++ www/server/any/cgi.md | ||
| @@ -68,6 +68,25 @@ | ||
| 68 | 68 | exists. |
| 69 | 69 | |
| 70 | 70 | Additional options available to the CGI script are [documented |
| 71 | 71 | separately](../../cgi.wiki). |
| 72 | 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 | + | |
| 73 | 92 | *[Return to the top-level Fossil server article.](../)* |
| 74 | 93 |
| --- 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 |