From: Marcin Haba Date: Sun, 13 Dec 2015 17:10:05 +0000 (+0100) Subject: baculum: Add example Nginx config X-Git-Tag: Release-7.4.0~133 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c0c1037eaa0645e8bd10ac771c86a4bc3d152350;p=bacula%2Fbacula baculum: Add example Nginx config --- diff --git a/gui/baculum/INSTALL b/gui/baculum/INSTALL index 46f665d449..4a9a1f58a6 100644 --- a/gui/baculum/INSTALL +++ b/gui/baculum/INSTALL @@ -237,8 +237,15 @@ In directory examples/ exists following configuration samples: ./examples/selinux/baculum.te <--- SELinux text module format ./examples/selinux/baculum.pp <--- SELinux binary module format ./examples/deb/ <=== samples for some deb-based distributions + ./examples/deb/baculum.startup <--- Baculum SysVinit startup script ./examples/deb/baculum.lighttpd.conf <--- sample Lighttpd config ./examples/deb/baculum.users <--- sample HTTP Basic auth file (user: admin, pass: admin) + ./examples/deb/baculum-apache.conf <--- sample Apache config + ./examples/deb-template <=== Directory with templates used by Makefile + ./examples/deb-template/baculum.users <--- sample HTTP Basic auth file (user: admin, pass: admin) + ./examples/deb-template/baculum-lighttpd.conf <--- Lighttpd config template + ./examples/deb-template/baculum-lighttpd.service <--- Baculum systemd unit for Lighttpd + ./examples/deb-template/baculum-apache.conf <--- Apache config template ./examples/rpm-template/ <=== Directory with templates used by Makefile ./examples/rpm-template/baculum-apache.conf <--- Apache config template ./examples/rpm-template/baculum-lighttpd.service <--- Baculum systemd unit for Lighttpd @@ -248,7 +255,8 @@ In directory examples/ exists following configuration samples: ./examples/rpm-template/baculum.startup <--- Baculum SysVinit startup script ./examples/sudo/ <=== example sudoers.d configurations ./examples/sudo/baculum-httpd <--- sample sudo for Apache user - ./examples/sudo/baculum-lighttpd <--- sample sudo for Lighttpd + ./examples/sudo/baculum-lighttpd <--- sample sudo for Lighttpd user + ./examples/sudo/baculum-nginx <--- sample sudo for Nginx user ./examples/rpm/ <=== samples for some rpm-based distributions ./examples/rpm/baculum-apache.conf <--- Apache config file ./examples/rpm/baculum-lighttpd.service <--- Baculum system unit @@ -256,6 +264,9 @@ In directory examples/ exists following configuration samples: ./examples/rpm/baculum-lighttpd.conf <--- Lighttpd config file ./examples/rpm/baculum.users <--- HTTP Basic auth file (user: admin, pass: admin) ./examples/rpm/baculum.startup <--- Baculum SysVinit startup script + ./examples/nginx/ <=== example Nginx configurations + ./examples/nginx/php-fpm/baculum-php.conf <--- example PHP-FPM config for Nginx + ./examples/nginx/baculum.conf <--- sample Nginx config 7 Makefile diff --git a/gui/baculum/examples/nginx/baculum.conf b/gui/baculum/examples/nginx/baculum.conf new file mode 100644 index 0000000000..51d5cab5c4 --- /dev/null +++ b/gui/baculum/examples/nginx/baculum.conf @@ -0,0 +1,42 @@ +upstream baculum-php { + server unix:/run/php-fpm/baculum-php.sock; +} + +server { + listen 9095; + server_name localhost; + root /usr/share/baculum/htdocs; + index index.php; + charset utf-8; + set $baculum_index "index.php"; + + location / { + auth_basic "Baculum Auth"; + auth_basic_user_file /usr/share/baculum/htdocs/protected/Data/baculum.users; + index $baculum_index; + try_files $uri $uri/ $baculum_index?$args; + rewrite ^/(.+)$ /index.php/$1 last; + } + + location ~ ^/(protected|framework) { + deny all; + } + + location ~ \.(js|css|png|jpg|gif|ico)$ { + try_files $uri = 404; + } + + location ~ \.php { + fastcgi_split_path_info ^(.+\.php)(.*)$; + set $furi /$baculum_index; + if (-f $document_root$fastcgi_script_name){ + set $furi $fastcgi_script_name; + } + fastcgi_param SCRIPT_FILENAME $document_root$furi; + fastcgi_param SERVER_NAME $host; + fastcgi_param PATH_INFO $fastcgi_path_info; + fastcgi_param PATH_TRANSLATED $document_root$furi; + fastcgi_pass baculum-php; + include fastcgi_params; + } +} \ No newline at end of file diff --git a/gui/baculum/examples/nginx/php-fpm/baculum-php.conf b/gui/baculum/examples/nginx/php-fpm/baculum-php.conf new file mode 100644 index 0000000000..31b19c630a --- /dev/null +++ b/gui/baculum/examples/nginx/php-fpm/baculum-php.conf @@ -0,0 +1,18 @@ +[baculum-php] +listen = /var/run/php-fpm/baculum-php.sock +listen.owner = nginx +listen.group = nginx +listen.mode = 0666 + +listen.backlog = -1 +listen.allowed_clients = 127.0.0.1 + +user = nginx +group = nginx + +pm = dynamic +pm.max_children = 5 +pm.start_servers = 2 +pm.min_spare_servers = 1 +pm.max_spare_servers = 3 +pm.max_requests = 500 diff --git a/gui/baculum/examples/sudo/baculum-nginx b/gui/baculum/examples/sudo/baculum-nginx new file mode 100644 index 0000000000..c7cb882ff6 --- /dev/null +++ b/gui/baculum/examples/sudo/baculum-nginx @@ -0,0 +1,2 @@ +Defaults:nginx !requiretty +nginx ALL= NOPASSWD: /usr/sbin/bconsole