Skip to content

Commit 30928b1

Browse files
committed
improve documentation regarding unix domain socket on proxy
1 parent 752f99c commit 30928b1

File tree

3 files changed

+23
-10
lines changed

3 files changed

+23
-10
lines changed

deployment/scgi/index.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,13 @@ Create virtual host config and add `ProxyPassMatch`, for example
7979
</VirtualHost>
8080
```
8181
You may need to replace `scgi://127.0.0.1:20477` with host and port where your
82-
application is running.
82+
application is listening. If you use unix domain socket, you need to modify `ProxyPassMatch` as follows
83+
84+
```
85+
ProxyPassMatch ^/(.*)$ "unix:/path/to/app.sock|scgi://127.0.0.1/"
86+
```
87+
88+
Line `|scgi://127.0.0.1/` is required so `mod_proxy_scgi` is called to handle request, although, host and port information are ignored.
8389

8490
Two `ProxyPassMatch` lines tell Apache to serve requests for
8591
files inside `css`, `images`, `js` directories directly. For other, pass requests to our application.

deployment/standalone-web-server/index.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,10 @@ $ fanocli --deploy-http=myapp.me --stdout
4343

4444
## Apache with mod_proxy_http module
4545

46-
To deploy as http application with [mod_proxy_http](https://httpd.apache.org/docs/2.4/mod/mod_proxy_http.html), you need to have `mod_proxy_http` installed and loaded. This module is not installed by default.
46+
To deploy as http application with [mod_proxy_http](https://httpd.apache.org/docs/2.4/mod/mod_proxy_http.html), you need to have `mod_proxy_http` installed and loaded. This module is installed but not enabled by default.
4747

4848
### Debian
4949

50-
To install module on Debian,
51-
52-
```
53-
$ sudo apt install libapache2_mod_proxy_http
54-
```
55-
5650
To enable module,
5751

5852
```
@@ -79,7 +73,14 @@ Create virtual host config and add `ProxyPassMatch`, for example
7973
</VirtualHost>
8074
```
8175
You may need to replace `http://127.0.0.1:20477` with host and port where your
82-
application is running.
76+
application is listening. If you use unix domain socket, you need to modify `ProxyPassMatch` as follows
77+
78+
```
79+
ProxyPassMatch ^/(.*)$ "unix:/path/to/app.sock|http://127.0.0.1/"
80+
```
81+
82+
Line `|http://127.0.0.1/` is required so `mod_proxy_http` is called to handle request, although, host and port information are ignored.
83+
8384

8485
Two `ProxyPassMatch` lines tell Apache to serve requests for
8586
files inside `css`, `images`, `js` directories directly. For other, pass requests to our application.

deployment/uwsgi/index.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,13 @@ Create virtual host config and add `ProxyPassMatch`, for example
8383
</VirtualHost>
8484
```
8585
You may need to replace `uwsgi://127.0.0.1:20477` with host and port where your
86-
application is running.
86+
application is running. If you use unix domain socket, you need to modify `ProxyPassMatch` as follows
87+
88+
```
89+
ProxyPassMatch ^/(.*)$ "unix:/path/to/app.sock|uwsgi://127.0.0.1/"
90+
```
91+
92+
Line `|uwsgi://127.0.0.1/` is required so `mod_proxy_uwsgi` is called to handle request, although, host and port information are ignored.
8793

8894
Two `ProxyPassMatch` lines tell Apache to serve requests for
8995
files inside `css`, `images`, `js` directories directly. For other, pass requests to our application.

0 commit comments

Comments
 (0)