From 3235186d3f4d7593c72cd623b9e3cccd8f1ad890 Mon Sep 17 00:00:00 2001 From: ajacoutot Date: Wed, 23 Mar 2011 07:41:45 +0000 Subject: [PATCH] Better webacula.conf. --- www/webacula/Makefile | 9 +- www/webacula/files/webacula.conf | 19 ---- .../patches/patch-install_webacula_conf | 86 +++++++++++++++++++ www/webacula/pkg/PLIST | 5 +- www/webacula/pkg/README | 4 +- 5 files changed, 94 insertions(+), 29 deletions(-) delete mode 100644 www/webacula/files/webacula.conf create mode 100644 www/webacula/patches/patch-install_webacula_conf diff --git a/www/webacula/Makefile b/www/webacula/Makefile index 56646026f2b..2df4bca8c62 100644 --- a/www/webacula/Makefile +++ b/www/webacula/Makefile @@ -1,10 +1,10 @@ -# $OpenBSD: Makefile,v 1.3 2011/03/22 15:43:53 ajacoutot Exp $ +# $OpenBSD: Makefile,v 1.4 2011/03/23 07:41:45 ajacoutot Exp $ COMMENT= bacula(8) web interface DISTNAME= webacula-5.0.3 -REVISION= 1 +REVISION= 2 CATEGORIES= www sysutils @@ -34,15 +34,14 @@ SUBST_VARS= INSTDIR TINSTDIR do-install: mv ${WRKSRC} ${INSTDIR} - ${SUBST_CMD} ${INSTDIR}/application/config.ini + ${SUBST_CMD} ${INSTDIR}/application/config.ini \ + ${INSTDIR}/install/webacula.conf .for i in install/webacula_mysql_create_database.sh \ install/webacula_postgresql_create_database.sh \ install/webacula_postgresql_make_tables.sh \ application/config.ini mv ${INSTDIR}/$i ${INSTDIR}/$i.dist .endfor - ${SUBST_CMD} -c ${FILESDIR}/webacula.conf \ - ${INSTDIR}/webacula.conf.dist ${SUBST_CMD} -c ${FILESDIR}/webacula-chroot-bconsole.sh \ ${INSTDIR}/webacula-chroot-bconsole find ${INSTDIR} -type f -name \*.orig -or -name \*.gitignore \ diff --git a/www/webacula/files/webacula.conf b/www/webacula/files/webacula.conf deleted file mode 100644 index a4820ea6cf8..00000000000 --- a/www/webacula/files/webacula.conf +++ /dev/null @@ -1,19 +0,0 @@ -Alias /webacula ${TINSTDIR}/html - - - php_value max_execution_time 3600 - - - - RewriteEngine on - Options FollowSymLinks - AllowOverride All - Order deny,allow - # allow authenticated users access from LAN and localhost - Allow from 127.0.0.1 - Allow from 192.168.255.0/255.255.255.0 - AuthType Basic - AuthName "Webacula" - AuthUserFile /var/www/conf/webacula.users - Require valid-user - diff --git a/www/webacula/patches/patch-install_webacula_conf b/www/webacula/patches/patch-install_webacula_conf new file mode 100644 index 00000000000..d16f285f150 --- /dev/null +++ b/www/webacula/patches/patch-install_webacula_conf @@ -0,0 +1,86 @@ +$OpenBSD: patch-install_webacula_conf,v 1.1 2011/03/23 07:41:45 ajacoutot Exp $ +--- install/webacula.conf.orig Wed Mar 23 08:31:24 2011 ++++ install/webacula.conf Wed Mar 23 08:33:10 2011 +@@ -3,17 +3,22 @@ + # Allows only localhost by default + # + +-LoadModule rewrite_module modules/mod_rewrite.so ++LoadModule rewrite_module /usr/lib/apache/modules/mod_rewrite.so + ++ ++ php_value max_execution_time 3600 ++ ++ + # AccessFileName .htaccess +-# RewriteLog "/var/log/httpd/rewrite.log" ++# RewriteLog "/var/www/log/rewrite.log" + # RewriteLogLevel 3 + + # SetEnv APPLICATION_ENV development + SetEnv APPLICATION_ENV production + +-Alias /webacula /usr/share/webacula/html +- ++Alias /webacula ${TINSTDIR}/html ++ ++ + RewriteEngine On + + RewriteBase /webacula +@@ -40,42 +45,42 @@ Alias /webacula /usr/share/webacula/html + + # AuthType Basic + # AuthName "Webacula" +-# AuthUserFile /etc/httpd/conf/webacula.users ++# AuthUserFile /var/www/conf/webacula.users + # Require valid-user + + + +- ++ + Order deny,allow + Deny from all + + +- ++ + Order deny,allow + Deny from all + + +- ++ + Order deny,allow + Deny from all + + +- ++ + Order deny,allow + Deny from all + + +- ++ + Order deny,allow + Deny from all + + +- ++ + Order deny,allow + Deny from all + + +- ++ + RewriteEngine On + # for test mod_rewrite + RewriteBase /webacula/test_mod_rewrite +@@ -93,4 +98,3 @@ Alias /webacula /usr/share/webacula/html + Allow from localhost + Allow from ::1 + +- diff --git a/www/webacula/pkg/PLIST b/www/webacula/pkg/PLIST index 2a1cad286b2..83aa5f12f24 100644 --- a/www/webacula/pkg/PLIST +++ b/www/webacula/pkg/PLIST @@ -1,4 +1,4 @@ -@comment $OpenBSD: PLIST,v 1.1.1.1 2011/03/21 18:01:09 ajacoutot Exp $ +@comment $OpenBSD: PLIST,v 1.2 2011/03/23 07:41:46 ajacoutot Exp $ webacula/ webacula/4CONTRIBUTORS webacula/4CONTRIBUTORS.ru @@ -254,6 +254,7 @@ webacula/install/ webacula/install/.htaccess webacula/install/check_system_requirements.php webacula/install/webacula.conf +@sample /var/www/conf/modules.sample/webacula.conf webacula/install/webacula_clean_tmp_files.sh webacula/install/webacula_mysql_create_database.sh.dist @mode 0755 @@ -316,7 +317,5 @@ webacula/update/webacula_sqlite_update_3.x_to_3.4.sh @mode 0555 webacula/webacula-chroot-bconsole @mode -webacula/webacula.conf.dist -@sample /var/www/conf/modules.sample/webacula.conf @cwd ${LOCALBASE}/share/doc/pkg-readmes ${FULLPKGNAME} diff --git a/www/webacula/pkg/README b/www/webacula/pkg/README index f45f462d818..8f48b86fd5b 100644 --- a/www/webacula/pkg/README +++ b/www/webacula/pkg/README @@ -1,4 +1,4 @@ -$OpenBSD: README,v 1.1.1.1 2011/03/21 18:01:09 ajacoutot Exp $ +$OpenBSD: README,v 1.2 2011/03/23 07:41:46 ajacoutot Exp $ Running webacula under OpenBSD ============================== @@ -91,7 +91,7 @@ After restarting your webserver, you can access webacula at: http:///webacula/ *** WARNING! -By default *anyone* can access the webacula interface. +By default *anyone* can access the webacula interface from localhost. A sample commented configuration for http basic authentication is available in /var/www/conf/modules.sample/webacula.conf and you are STRONGLY ADVISED to enable and edit it to your needs.