From b080e36462f08a5eb3d8b42b01a9e3077a9772a6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bar=C4=B1=C5=9F=20Metin?= Date: Mon, 14 Dec 2009 12:01:22 +0000 Subject: [PATCH] more fixes for a new install --- Monitor.spec | 10 ++++--- monitor-default.conf | 2 ++ web/monitorweb-httpd.conf | 56 ++++++++++++++------------------------- 3 files changed, 28 insertions(+), 40 deletions(-) diff --git a/Monitor.spec b/Monitor.spec index 81697c9..627cca7 100644 --- a/Monitor.spec +++ b/Monitor.spec @@ -5,8 +5,9 @@ %define url $URL: svn+ssh://svn.planet-lab.org/svn/monitor/trunk/monitor.spec $ %define name monitor -%define version %(python -c "import sys; sys.path.append('$RPM_SOURCE_DIR');from monitor.monitor_version import *; print monitor_version") -%define taglevel 25 +# keep this version in sync with monitor/monitor_version.py +%define version 3.0 +%Define Taglevel 25 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}} %global python_sitearch %( python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)" ) @@ -154,12 +155,13 @@ install -D -m 644 monitor.functions $RPM_BUILD_ROOT/%{_sysconfdir}/plc.d/monitor install -D -m 755 monitor-server.init $RPM_BUILD_ROOT/%{_sysconfdir}/plc.d/monitor install -D -m 755 zabbix/monitor-zabbix.init $RPM_BUILD_ROOT/%{_sysconfdir}/plc.d/zabbix -install -D -m 644 monitor_version.py $RPM_BUILD_ROOT/usr/share/%{name}/ - echo " * Installing core scripts" rsync -a --exclude www --exclude archive-pdb --exclude .svn --exclude CVS \ ./ $RPM_BUILD_ROOT/usr/share/%{name}/ +install -D -m 644 web/monitorweb-httpd.conf $RPM_BUILD_ROOT/etc/httpd/conf.d/ + + echo " * Installing web pages" #rsync -a www/ $RPM_BUILD_ROOT/var/www/cgi-bin/monitor/ rsync -a log/ $RPM_BUILD_ROOT/var/www/html/monitorlog/ diff --git a/monitor-default.conf b/monitor-default.conf index 7414d41..9a5a52f 100644 --- a/monitor-default.conf +++ b/monitor-default.conf @@ -35,6 +35,8 @@ support_email=support@planet-lab.org # mailing list copied on all out-going messages cc_email=monitor-list@lists.planet-lab.org +zabbix_enabled=0 + [monitordatabase] monitor_dburi=postgres://user:passwd@localhost:5432/infovacuum zabbix_dburi=postgres://zabbixuser:<...>@localhost:5432/zabbix diff --git a/web/monitorweb-httpd.conf b/web/monitorweb-httpd.conf index 1ee0e3b..bf28927 100644 --- a/web/monitorweb-httpd.conf +++ b/web/monitorweb-httpd.conf @@ -1,36 +1,20 @@ -NameVirtualHost * - - - ServerName pl-virtual-06.cs.princeton.edu - ServerAdmin soltesz@cs.princeton.edu - UseCanonicalName Off - ServerSignature Off - - #DocumentRoot /usr/share/monitor/web/MonitorWeb/monitorweb - - # - # Options Indexes FollowSymLinks - # AllowOverride None - # Order allow,deny - # Allow from all - # - - Errorlog /var/log/httpd/monitorwebapp-error_log - Customlog /var/log/httpd/monitorwebapp-access_log common - - AddDefaultCharset utf-8 - - #NOTE: This doesn't work as expected. - # Load everything out of the DocumentRoot that is static - # ProxyPass /monitor/static ! - - ProxyPass /tg_js http://127.0.0.1:8080/tg_js - ProxyPassReverse /tg_js http://127.0.0.1:8080/tg_js - - ProxyPass /monitor http://127.0.0.1:8080 - ProxyPassReverse /monitor http://127.0.0.1:8080 - - ProxyPreserveHost On - ProxyRequests Off - - +# NOTE: I've tried other means of redirection, including mod_rewrite, but did +# not have any success. The means below is not idea, b/c it does not keep +# non-ssl session as non-ssl. But it works. + +# NOTE: redirect path without trailing '/' to path with. +Redirect /monitor /monitor/ + +# NOTE: this directive strips '/monitor/' from the requested path and pastes +# the remaining part to the end of the ProxyPass url below. All TG urls +# should be relative to their current position, or the absolute path +# that includes /monitor/ at the beginning. +# TODO: make location configurable. + + #LogLevel debug + #Errorlog /var/log/httpd/monitorwebapp-error_log + #Customlog /var/log/httpd/monitorwebapp-access_log common + + ProxyPass http://127.0.0.1:8082/ + ProxyPassReverse http://127.0.0.1:8082/ + -- 2.43.0