Showing 1 changed files with 33 additions and 0 deletions
+33
README.md
... ...
@@ -347,6 +347,39 @@ If you use GitPrep vis https, you should set X-Forwarded-HTTPS Request Header.
347 347
       RequestHeader set X-Forwarded-HTTPS "1"
348 348
     </VirtualHost>
349 349
 
350
+### How to use reverse proxy with sub directory?
351
+
352
+GitPrep support reverse proxy with sub directory.
353
+
354
+At first, set [reverse_proxy]path_depth option.
355
+
356
+    [reverse_proxy]
357
+
358
+    ;;; Reverse proxy path depth (default: none)
359
+    ;;; If proxy path is http://somehost.com/foo, you set path_depth to 1.
360
+    ;;; If proxy path is http://somehost.com/foo/bar, you set path_depth to 2.
361
+    path_depth=1
362
+
363
+Next you set http server config file. The following is apache example.
364
+
365
+    <VirtualHost *:80>
366
+      ServerName perlcodesample.com
367
+      <Proxy *>
368
+        Order deny,allow
369
+        Allow from all
370
+      </Proxy>
371
+      ProxyRequests Off
372
+      ProxyPreserveHost On
373
+
374
+      ProxyPass /app1 http://localhost:10020/app1 keepalive=On
375
+      ProxyPassReverse /app1 http://localhost:3000/app1
376
+
377
+      ProxyPass /app2 http://localhost:10021/app2 keepalive=On
378
+      ProxyPassReverse /app2 http://localhost:3001/app2
379
+
380
+      RequestHeader set X-Forwarded-HTTPS "0"
381
+    </VirtualHost>
382
+
350 383
 ### How to import already existing repositories?
351 384
 
352 385
 You can import already existing repositories by **script/import_rep** script.