mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Merge pull request #2235 from tim-moody/kiwix-nginx
softcode and increase proxy timeouts for kiwix in nginx
This commit is contained in:
commit
07fbd086fa
3 changed files with 12 additions and 1 deletions
|
@ -38,3 +38,5 @@ kiwix_library_xml: "{{ iiab_zim_path }}/library.xml"
|
|||
# - NEW WAY: cd /opt/iiab/iiab; ./runrole --reinstall kiwix
|
||||
# - OLD WAY: rm /opt/iiab/kiwix/bin/kiwix-serve; cd /opt/iiab/iiab; ./runrole kiwix
|
||||
kiwix_force_install: False
|
||||
kiwix_nginx_timeout: 600
|
||||
kiwix_threads: 4
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
location /kiwix {
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Connection "";
|
||||
proxy_connect_timeout {{ kiwix_nginx_timeout }};
|
||||
proxy_send_timeout {{ kiwix_nginx_timeout }};
|
||||
proxy_read_timeout {{ kiwix_nginx_timeout }};
|
||||
send_timeout {{ kiwix_nginx_timeout }};
|
||||
proxy_pass http://127.0.0.1:3000;
|
||||
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ After=syslog.target network.target local-fs.target
|
|||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart={{ iiab_base }}/kiwix/bin/kiwix-serve --daemon --port {{ kiwix_port }} --nolibrarybutton --library {{ kiwix_library_xml }} --urlRootLocation={{ kiwix_url }}
|
||||
ExecStart={{ iiab_base }}/kiwix/bin/kiwix-serve --daemon --port {{ kiwix_port }} --nolibrarybutton --library {{ kiwix_library_xml }} --urlRootLocation={{ kiwix_url }} --threads {{ kiwix_threads }}
|
||||
TimeoutStartSec=180
|
||||
Restart=on-abort
|
||||
RestartSec=5s
|
||||
|
|
Loading…
Add table
Reference in a new issue