mirror of
https://github.com/TrentSPalmer/trentdocs_website.git
synced 2024-12-28 20:12:49 -08:00
update gitit instructions with reverse proxy
This commit is contained in:
parent
7f4b6bc5c1
commit
f2399ba6a1
@ -178,3 +178,33 @@ find git. But the symlink solution is easy enough.
|
|||||||
```csh
|
```csh
|
||||||
ln -s /usr/local/bin/git /usr/bin/
|
ln -s /usr/local/bin/git /usr/bin/
|
||||||
```
|
```
|
||||||
|
|
||||||
|
And you might as well stick a reverse proxy in front of it. Assuming
|
||||||
|
you configure gitit listen only on localhost:5001, install nginx.
|
||||||
|
`pkg install nginx`
|
||||||
|
|
||||||
|
enable nginx in /etc/rc.conf
|
||||||
|
|
||||||
|
```conf
|
||||||
|
nginx_enable="YES"
|
||||||
|
```
|
||||||
|
|
||||||
|
Then, in the file `/usr/local/etc/nginx/nginx.conf` change the location "*/*"
|
||||||
|
so that it looks like this.
|
||||||
|
|
||||||
|
```nginx
|
||||||
|
{
|
||||||
|
.....
|
||||||
|
location / {
|
||||||
|
# root /usr/local/www/nginx;
|
||||||
|
# index index.html index.htm;
|
||||||
|
proxy_pass http://127.0.0.1:5001;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
}
|
||||||
|
....
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
and then start nginx `service nginx start`
|
||||||
|
@ -289,6 +289,31 @@ find git. But the symlink solution is easy enough.</p>
|
|||||||
<pre><code class="csh">ln -s /usr/local/bin/git /usr/bin/
|
<pre><code class="csh">ln -s /usr/local/bin/git /usr/bin/
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
|
<p>And you might as well stick a reverse proxy in front of it. Assuming
|
||||||
|
you configure gitit listen only on localhost:5001, install nginx.
|
||||||
|
<code>pkg install nginx</code></p>
|
||||||
|
<p>enable nginx in /etc/rc.conf</p>
|
||||||
|
<pre><code class="conf">nginx_enable="YES"
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>Then, in the file <code>/usr/local/etc/nginx/nginx.conf</code> change the location "<em>/</em>"
|
||||||
|
so that it looks like this.</p>
|
||||||
|
<pre><code class="nginx">{
|
||||||
|
.....
|
||||||
|
location / {
|
||||||
|
# root /usr/local/www/nginx;
|
||||||
|
# index index.html index.htm;
|
||||||
|
proxy_pass http://127.0.0.1:5001;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
}
|
||||||
|
....
|
||||||
|
}
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>and then start nginx <code>service nginx start</code></p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<footer>
|
<footer>
|
||||||
|
@ -204,5 +204,5 @@
|
|||||||
|
|
||||||
<!--
|
<!--
|
||||||
MkDocs version : 0.16.3
|
MkDocs version : 0.16.3
|
||||||
Build Date UTC : 2017-07-16 11:50:18
|
Build Date UTC : 2017-07-17 10:26:28
|
||||||
-->
|
-->
|
||||||
|
File diff suppressed because one or more lines are too long
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>/</loc>
|
<loc>/</loc>
|
||||||
<lastmod>2017-07-16</lastmod>
|
<lastmod>2017-07-17</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>/serve_and_share_apps_from_your_phone_with_fdroid/</loc>
|
<loc>/serve_and_share_apps_from_your_phone_with_fdroid/</loc>
|
||||||
<lastmod>2017-07-16</lastmod>
|
<lastmod>2017-07-17</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>/nspawn/</loc>
|
<loc>/nspawn/</loc>
|
||||||
<lastmod>2017-07-16</lastmod>
|
<lastmod>2017-07-17</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>/mastodon_on_arch/</loc>
|
<loc>/mastodon_on_arch/</loc>
|
||||||
<lastmod>2017-07-16</lastmod>
|
<lastmod>2017-07-17</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>/debian_nspawn_container_on_arch_for_testing_apache_configurations/</loc>
|
<loc>/debian_nspawn_container_on_arch_for_testing_apache_configurations/</loc>
|
||||||
<lastmod>2017-07-16</lastmod>
|
<lastmod>2017-07-17</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>/dynamic_cacheing_nginx_reverse_proxy_for_pacman/</loc>
|
<loc>/dynamic_cacheing_nginx_reverse_proxy_for_pacman/</loc>
|
||||||
<lastmod>2017-07-16</lastmod>
|
<lastmod>2017-07-17</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>/freebsd_jails_on_freenas/</loc>
|
<loc>/freebsd_jails_on_freenas/</loc>
|
||||||
<lastmod>2017-07-16</lastmod>
|
<lastmod>2017-07-17</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
@ -60,7 +60,7 @@
|
|||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>/arch_redis_nspawn/</loc>
|
<loc>/arch_redis_nspawn/</loc>
|
||||||
<lastmod>2017-07-16</lastmod>
|
<lastmod>2017-07-17</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
@ -68,7 +68,7 @@
|
|||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>/arch_postgresql_nspawn/</loc>
|
<loc>/arch_postgresql_nspawn/</loc>
|
||||||
<lastmod>2017-07-16</lastmod>
|
<lastmod>2017-07-17</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
@ -76,7 +76,7 @@
|
|||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>/self_signed_certs/</loc>
|
<loc>/self_signed_certs/</loc>
|
||||||
<lastmod>2017-07-16</lastmod>
|
<lastmod>2017-07-17</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user