[icinga-checkins] icinga.org: icinga-core/rbartels/cgi-current: moved cgi log location from var/cgi_logs to share/log #1161

git at icinga.org git at icinga.org
Mon Mar 14 16:57:51 CET 2011


Module: icinga-core
Branch: rbartels/cgi-current
Commit: b61874f8d25d0b30daaf81deb469aeb7d37e4735
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=b61874f8d25d0b30daaf81deb469aeb7d37e4735

Author: Ricardo Bartels <ricardo at bitchbrothers.com>
Date:   Mon Mar 14 16:21:51 2011 +0100

moved cgi log location from var/cgi_logs to share/log #1161

refs: #1161

---

 cgi/Makefile.in             |    1 -
 cgi/cgiutils.c              |    2 +-
 cgi/readlogs.c              |    2 +-
 html/Makefile.in            |    1 +
 html/log/.htaccess          |    1 +
 html/log/index.htm          |    1 +
 sample-config/cgi.cfg.in    |    4 ++--
 sample-config/httpd.conf.in |    2 +-
 8 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/cgi/Makefile.in b/cgi/Makefile.in
index f5565a9..5a1f94b 100644
--- a/cgi/Makefile.in
+++ b/cgi/Makefile.in
@@ -200,7 +200,6 @@ install-basic:
 	for file in *.cgi; do \
 		$(INSTALL) -m 775 $(INSTALL_OPTS) $$file $(DESTDIR)$(CGIDIR); \
 	done
-	$(INSTALL) -m 775 $(COMMAND_OPTS) -d $(DESTDIR)$(LOGDIR)/cgi_logs
 
 strip-post-install:
 	for file in *.cgi; do \
diff --git a/cgi/cgiutils.c b/cgi/cgiutils.c
index ca73b89..fdce79c 100644
--- a/cgi/cgiutils.c
+++ b/cgi/cgiutils.c
@@ -87,7 +87,7 @@ extern time_t   last_command_check;
 extern time_t   last_log_rotation;
 
 /** readlogs.c **/
-int		log_rotation_method;
+int		log_rotation_method=LOG_ROTATION_NONE;
 extern time_t	this_scheduled_log_rotation;
 extern time_t	last_scheduled_log_rotation;
 extern time_t	next_scheduled_log_rotation;
diff --git a/cgi/readlogs.c b/cgi/readlogs.c
index 708cd79..05254ba 100644
--- a/cgi/readlogs.c
+++ b/cgi/readlogs.c
@@ -31,7 +31,7 @@ logfilter	*filter_list=NULL;
 logentry 	*entry_list=NULL;
 
 /** Initialazing some vars */
-extern int      log_rotation_method=LOG_ROTATION_NONE;
+extern int      log_rotation_method;
 
 time_t          this_scheduled_log_rotation=0L;
 time_t          last_scheduled_log_rotation=0L;
diff --git a/html/Makefile.in b/html/Makefile.in
index 6608920..90f509b 100644
--- a/html/Makefile.in
+++ b/html/Makefile.in
@@ -50,6 +50,7 @@ install:
 	$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/images/logos
 	$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/images/interface
 	$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/js
+	$(INSTALL) -m 775 $(COMMAND_OPTS) -d $(DESTDIR)$(HTMLDIR)/log
 	$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/ssi
 	$(INSTALL) -m 664 $(INSTALL_OPTS) robots.txt $(DESTDIR)$(HTMLDIR)
 	$(INSTALL) -m 664 $(INSTALL_OPTS) docs/robots.txt $(DESTDIR)$(HTMLDIR)/docs
diff --git a/html/log/.htaccess b/html/log/.htaccess
new file mode 100644
index 0000000..8d2f256
--- /dev/null
+++ b/html/log/.htaccess
@@ -0,0 +1 @@
+deny from all
diff --git a/html/log/index.htm b/html/log/index.htm
new file mode 100644
index 0000000..18ecdcb
--- /dev/null
+++ b/html/log/index.htm
@@ -0,0 +1 @@
+<html></html>
diff --git a/sample-config/cgi.cfg.in b/sample-config/cgi.cfg.in
index a6a61c5..6c3295b 100644
--- a/sample-config/cgi.cfg.in
+++ b/sample-config/cgi.cfg.in
@@ -92,7 +92,7 @@ use_logging=0
 # This is the cgi log file for information about what users are doing.
 # At the moment only submitted commands from cmd.cgi will be logged.
 
-cgi_log_file=@localstatedir@/cgi_logs/icinga-cgi.log
+cgi_log_file=@datadir@/log/icinga-cgi.log
 
 
 # CGI LOG ROTATION METHOD
@@ -111,7 +111,7 @@ cgi_log_rotation_method=d
 # This is the directory where archived (rotated) cgi log files should be
 # placed (assuming you've chosen to do log rotation).
 
-cgi_log_archive_path=@localstatedir@/cgi_logs
+cgi_log_archive_path=@datadir@/log
 
 
 # AUTHENTICATION USAGE
diff --git a/sample-config/httpd.conf.in b/sample-config/httpd.conf.in
index 679500b..93df41a 100644
--- a/sample-config/httpd.conf.in
+++ b/sample-config/httpd.conf.in
@@ -27,7 +27,7 @@ Alias @htmurl@ "@datadir@/"
 <Directory "@datadir@/">
 #  SSLRequireSSL
    Options None
-   AllowOverride None
+   AllowOverride All
    Order allow,deny
    Allow from all
 #  Order deny,allow





More information about the icinga-checkins mailing list