From: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
To: git@vger.kernel.org, chriscool@tuxfamily.org, pasky@ucw.cz,
jnareb@gmail.com
Cc: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
Subject: [PATCH GSoC 3/4] git-instaweb: Put httpd logs in a "$httpd_only" subdirectory
Date: Fri, 28 May 2010 11:55:51 +0530 [thread overview]
Message-ID: <1275027952-5057-3-git-send-email-pavan.sss1991@gmail.com> (raw)
In-Reply-To: <1275027952-5057-1-git-send-email-pavan.sss1991@gmail.com>
Resolve full httpd and create "$httpd_only" subdirectory before
writing httpd.conf so that error.log and access.log go into it.
While at it, change apache2 configuration to use logs in a
similiar fashion.
Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Mentored-by: Petr Baudis <pasky@ucw.cz>
---
git-instaweb.sh | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/git-instaweb.sh b/git-instaweb.sh
index f608014..f03465c 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -206,11 +206,11 @@ server.port = $port
server.modules = ( "mod_setenv", "mod_cgi" )
server.indexfiles = ( "gitweb.cgi" )
server.pid-file = "$fqgitdir/pid"
-server.errorlog = "$fqgitdir/gitweb/error.log"
+server.errorlog = "$fqgitdir/gitweb/$httpd_only/error.log"
# to enable, add "mod_access", "mod_accesslog" to server.modules
# variable above and uncomment this
-#accesslog.filename = "$fqgitdir/gitweb/access.log"
+#accesslog.filename = "$fqgitdir/gitweb/$httpd_only/access.log"
setenv.add-environment = ( "PATH" => env.PATH )
@@ -277,7 +277,6 @@ EOF
apache2_conf () {
test -z "$module_path" && module_path=/usr/lib/apache2/modules
- mkdir -p "$GIT_DIR/gitweb/logs"
bind=
test x"$local" = xtrue && bind='127.0.0.1:'
echo 'text/css css' > "$fqgitdir/mime.types"
@@ -285,6 +284,8 @@ apache2_conf () {
ServerName "git-instaweb"
ServerRoot "$fqgitdir/gitweb"
DocumentRoot "$fqgitdir/gitweb"
+ErrorLog "$fqgitdir/gitweb/$httpd_only/error.log"
+CustomLog "$fqgitdir/gitweb/$httpd_only/access.log" combined
PidFile "$fqgitdir/pid"
Listen $bind$port
EOF
@@ -357,8 +358,8 @@ root $fqgitdir/gitweb
ports $port
index_files gitweb.cgi
#ssl_cert $fqgitdir/gitweb/ssl_cert.pem
-error_log $fqgitdir/gitweb/error.log
-access_log $fqgitdir/gitweb/access.log
+error_log $fqgitdir/gitweb/$httpd_only/error.log
+access_log $fqgitdir/gitweb/$httpd_only/access.log
#cgi setup
cgi_env PATH=$PATH,GIT_DIR=$GIT_DIR,GIT_EXEC_PATH=$GIT_EXEC_PATH
@@ -406,6 +407,9 @@ gitweb_cgi "$GIT_DIR/gitweb/gitweb.cgi"
gitweb_css "$GIT_DIR/@@GITWEB_CSS_NAME@@"
gitweb_js "$GIT_DIR/@@GITWEB_JS_NAME@@"
+resolve_full_httpd
+mkdir -p "$fqgitdir/gitweb/$httpd_only"
+
case "$httpd" in
*lighttpd*)
lighttpd_conf
--
1.7.1.18.gf661c6.dirty
next prev parent reply other threads:[~2010-05-28 6:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-28 6:25 [PATCH GSoC 1/4] gitweb: Move static files into seperate subdirectory Pavan Kumar Sunkara
2010-05-28 6:25 ` [PATCH GSoC 2/4] gitweb: Set default destination directory for installing gitweb in Makefile Pavan Kumar Sunkara
2010-05-28 6:25 ` Pavan Kumar Sunkara [this message]
2010-05-28 6:25 ` [PATCH GSoC 4/4] git-instaweb: Configure it to work with new gitweb structure Pavan Kumar Sunkara
2010-05-28 16:56 ` [PATCH GSoC 1/4] gitweb: Move static files into seperate subdirectory Christian Couder
2010-05-29 1:10 ` Junio C Hamano
2010-05-31 21:36 ` Petr Baudis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1275027952-5057-3-git-send-email-pavan.sss1991@gmail.com \
--to=pavan.sss1991@gmail.com \
--cc=chriscool@tuxfamily.org \
--cc=git@vger.kernel.org \
--cc=jnareb@gmail.com \
--cc=pasky@ucw.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).