You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: INSTALL.md
+61Lines changed: 61 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,6 +64,14 @@ tools/cli/ob passwd admin
64
64
65
65
8. Set up a service (or similar) to run required background tasks such as generating thumbnails and cache management. This service should ensure that `tools/cli/ob cron monitor` is running continuously.
66
66
67
+
9. To improve performance, set one of the OB_SENDFILE_HEADER following values in `config.php`. Ensure your web server and site configuration supports this (see Nginx example below).
68
+
69
+
```
70
+
define('OB_SENDFILE_HEADER', 'X-Sendfile'); // set appropriate SENDFILE header based on server (apache)
71
+
define('OB_SENDFILE_HEADER', 'X-Accel-Redirect'); // set appropriate SENDFILE header based on server (nginx)
72
+
define('OB_SENDFILE_HEADER', 'X-LIGHTTPD-send-file'); // set appropriate SENDFILE header based on server (lighttpd)
73
+
```
74
+
67
75
## Example Service
68
76
69
77
As an example for step 8, set up a service, `/etc/systemd/system/ob.service`, as follows. Be sure to update the `ExecStart` path and `User` as necessary.
@@ -92,3 +100,56 @@ systemctl enable ob
92
100
systemctl start ob
93
101
```
94
102
103
+
## Nginx Configuration
104
+
105
+
1. Make sure 'mjs' is added as an extension for application/javascript in `/etc/nginx/mime.types`:
106
+
107
+
```
108
+
application/javascript js mjs;
109
+
```
110
+
111
+
2. Use the following as a starting point for your site configuration, updating values as necessary:
112
+
113
+
```
114
+
server {
115
+
listen 80;
116
+
server_name openbroadcaster.example.com;
117
+
118
+
root /home/openbroadcaster/www;
119
+
index index.php;
120
+
121
+
location / {
122
+
try_files $uri $uri/ =404;
123
+
}
124
+
125
+
# disallow access to files and directories starting with a period
0 commit comments