]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Remove hardcoded paths from MPMs and move them to a more central
authorSander Striker <striker@apache.org>
Thu, 4 Apr 2002 09:15:44 +0000 (09:15 +0000)
committerSander Striker <striker@apache.org>
Thu, 4 Apr 2002 09:15:44 +0000 (09:15 +0000)
place.  Expand paths in httpd-std.conf in a similar fashion as we do
in our headers.

Submitted by: Pier Fumagalli <pier@betaversion.org>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94431 13f79535-47bb-0310-9956-ffa450edef68

16 files changed:
Makefile.in
configure.in
docs/conf/httpd-std.conf.in [moved from docs/conf/httpd-std.conf with 95% similarity]
include/ap_config.h
include/ap_config_layout.h.in [new file with mode: 0644]
modules/generators/mod_cgid.c
server/mpm/beos/mpm_default.h
server/mpm/experimental/perchild/mpm_default.h
server/mpm/mpmt_os2/mpm_default.h
server/mpm/netware/mpm_default.h
server/mpm/perchild/mpm_default.h
server/mpm/prefork/mpm_default.h
server/mpm/prefork/prefork.c
server/mpm/winnt/mpm_default.h
server/mpm/worker/mpm_default.h
support/apachectl.in

index 7d255e0ebf368a668f4d4ebba53cfd6665bfcf1e..d850fecd1af3ff01016ef94db133d119ad87d6fa 100644 (file)
@@ -20,9 +20,9 @@ INSTALL_TARGETS = install-conf install-htdocs install-error install-icons \
        install-other install-cgi install-include install-suexec install-man \
        install-build
 
-DISTCLEAN_TARGETS  = include/ap_config_auto.h include/ap_config_path.h \
+DISTCLEAN_TARGETS  = include/ap_config_auto.h include/ap_config_layout.h \
        modules.c config.cache config.log config.status build/config_vars.mk \
-        build/rules.mk
+        build/rules.mk docs/conf/httpd-std.conf
 EXTRACLEAN_TARGETS = configure include/ap_config_auto.h.in generated_lists
 
 include $(top_builddir)/build/rules.mk
index f9d3b0fb30ec7b8ed1fd10eaf484eec7c4a6f700..9983cb955771fa8862ef68aa58b8c684beee95f0 100644 (file)
@@ -480,7 +480,7 @@ case $host in
     ;;
 esac
 
-AC_OUTPUT($APACHE_OUTPUT_FILES support/apxs support/apachectl support/dbmmanage support/envvars-std support/log_server_status support/logresolve.pl support/phf_abuse_log.cgi support/split-logfile build/rules.mk,[true],[
+AC_OUTPUT($APACHE_OUTPUT_FILES docs/conf/httpd-std.conf include/ap_config_layout.h support/apxs support/apachectl support/dbmmanage support/envvars-std support/log_server_status support/logresolve.pl support/phf_abuse_log.cgi support/split-logfile build/rules.mk,[true],[
   APACHE_GEN_MAKEFILES
 ])
 
similarity index 95%
rename from docs/conf/httpd-std.conf
rename to docs/conf/httpd-std.conf.in
index 7a408098d67b7880fa976421a0902af202893b88..b015f27a8fd86720a25c7bc7384eda6839ac6b1a 100644 (file)
@@ -24,9 +24,9 @@
 # Configuration and logfile names: If the filenames you specify for many
 # of the server's control files begin with "/" (or "drive:/" for Win32), the
 # server will use that explicit path.  If the filenames do *not* begin
-# with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
-# with ServerRoot set to "/usr/local/apache" will be interpreted by the
-# server as "/usr/local/apache/logs/foo.log".
+# with "/", the value of ServerRoot is prepended -- so "@rel_logfiledir@/foo.log"
+# with ServerRoot set to "@@ServerRoot@@" will be interpreted by the
+# server as "@@ServerRoot@@/@rel_logfiledir@/foo.log".
 #
 
 ### Section 1: Global Environment
@@ -54,7 +54,7 @@ ServerRoot "@@ServerRoot@@"
 #
 <IfModule !mpm_winnt.c>
 <IfModule !mpm_netware.c>
-#LockFile logs/accept.lock
+#LockFile @rel_logfiledir@/accept.lock
 </IfModule>
 </IfModule>
 
@@ -68,7 +68,7 @@ ServerRoot "@@ServerRoot@@"
 #
 <IfModule !mpm_netware.c>
 <IfModule !perchild.c>
-#ScoreBoardFile logs/apache_runtime_status
+#ScoreBoardFile @rel_logfiledir@/apache_runtime_status
 </IfModule>
 </IfModule>
 
@@ -78,7 +78,7 @@ ServerRoot "@@ServerRoot@@"
 # identification number when it starts.
 #
 <IfModule !mpm_netware.c>
-PidFile logs/httpd.pid
+PidFile @rel_logfiledir@/httpd.pid
 </IfModule>
 
 #
@@ -290,7 +290,7 @@ UseCanonicalName Off
 # documents. By default, all requests are taken from this directory, but
 # symbolic links and aliases may be used to point to other locations.
 #
-DocumentRoot "@@ServerRoot@@/htdocs"
+DocumentRoot "@@ServerRoot@@/@rel_htdocsdir@"
 
 #
 # Each directory to which Apache has access can be configured with respect
@@ -315,7 +315,7 @@ DocumentRoot "@@ServerRoot@@/htdocs"
 #
 # This should be changed to whatever you set DocumentRoot to.
 #
-<Directory "@@ServerRoot@@/htdocs">
+<Directory "@@ServerRoot@@/@rel_htdocsdir@">
 
 #
 # Possible values for the Options directive are "None", "All",
@@ -398,7 +398,7 @@ AccessFileName .htaccess
 # TypesConfig describes where the mime.types file (or equivalent) is
 # to be found.
 #
-TypesConfig conf/mime.types
+TypesConfig @rel_sysconfdir@/mime.types
 
 #
 # DefaultType is the default MIME type the server will use for a document
@@ -417,7 +417,7 @@ DefaultType text/plain
 # directive tells the module where the hint definitions are located.
 #
 <IfModule mod_mime_magic.c>
-    MIMEMagicFile conf/magic
+    MIMEMagicFile @rel_sysconfdir@/magic
 </IfModule>
 
 #
@@ -437,7 +437,7 @@ HostnameLookups Off
 # logged here.  If you *do* define an error logfile for a <VirtualHost>
 # container, that host's errors will be logged there and not here.
 #
-ErrorLog logs/error_log
+ErrorLog @rel_logfiledir@/error_log
 
 #
 # LogLevel: Control the number of messages logged to the error_log.
@@ -462,20 +462,20 @@ LogFormat "%{User-agent}i" agent
 # define per-<VirtualHost> access logfiles, transactions will be
 # logged therein and *not* in this file.
 #
-CustomLog logs/access_log common
+CustomLog @rel_logfiledir@/access_log common
 
 #
 # If you would like to have agent and referer logfiles, uncomment the
 # following directives.
 #
-#CustomLog logs/referer_log referer
-#CustomLog logs/agent_log agent
+#CustomLog @rel_logfiledir@/referer_log referer
+#CustomLog @rel_logfiledir@/agent_log agent
 
 #
 # If you prefer a single logfile with access, agent, and referer information
 # (Combined Logfile Format) you can use the following directive.
 #
-#CustomLog logs/access_log combined
+#CustomLog @rel_logfiledir@/access_log combined
 
 #
 # Optionally add a line containing the server version and virtual host
@@ -499,9 +499,9 @@ ServerSignature On
 # We include the /icons/ alias for FancyIndexed directory listings.  If you
 # do not use FancyIndexing, you may comment this out.
 #
-Alias /icons/ "@@ServerRoot@@/icons/"
+Alias /icons/ "@@ServerRoot@@/@rel_iconsdir@/"
 
-<Directory "@@ServerRoot@@/icons">
+<Directory "@@ServerRoot@@/@rel_iconsdir@">
     Options Indexes MultiViews
     AllowOverride None
     Order allow,deny
@@ -513,9 +513,9 @@ Alias /icons/ "@@ServerRoot@@/icons/"
 # the manual, even if you choose to move your DocumentRoot.  You may comment
 # this out if you do not care for the documentation.
 #
-Alias /manual "@@ServerRoot@@/manual"
+Alias /manual "@@ServerRoot@@/@rel_manualdir@"
 
-<Directory "@@ServerRoot@@/manual">
+<Directory "@@ServerRoot@@/@rel_manualdir@">
     Options Indexes FollowSymLinks MultiViews
     AllowOverride None
     Order allow,deny
@@ -530,21 +530,21 @@ Alias /manual "@@ServerRoot@@/manual"
 # The same rules about trailing "/" apply to ScriptAlias directives as to
 # Alias.
 #
-ScriptAlias /cgi-bin/ "@@ServerRoot@@/cgi-bin/"
+ScriptAlias /cgi-bin/ "@@ServerRoot@@/@rel_cgidir@/"
 
 <IfModule mod_cgid.c>
 #
 # Additional to mod_cgid.c settings, mod_cgid has Scriptsock <path>
 # for setting UNIX socket for communicating with cgid.
 #
-#Scriptsock            logs/cgisock
+#Scriptsock            @rel_runtimedir@/cgisock
 </IfModule>
 
 #
-# "@@ServerRoot@@/cgi-bin" should be changed to whatever your ScriptAliased
+# "@@ServerRoot@@/@rel_cgidir@" should be changed to whatever your ScriptAliased
 # CGI directory exists, if you have that configured.
 #
-<Directory "@@ServerRoot@@/cgi-bin">
+<Directory "@@ServerRoot@@/@rel_cgidir@">
     AllowOverride None
     Options None
     Order allow,deny
@@ -854,15 +854,15 @@ AddHandler type-map var
 #   Alias /error/include/ "/your/include/path/"
 #
 # which allows you to create your own set of files by starting with the
-# @@ServerRoot@@/error/include/ files and
+# @@ServerRoot@@/@rel_errordir@/include/ files and
 # copying them to /your/include/path/, even on a per-VirtualHost basis.
 #
 
 <IfModule mod_negotiation.c>
 <IfModule mod_include.c>
-    Alias /error/ "@@ServerRoot@@/error/"
+    Alias /error/ "@@ServerRoot@@/@rel_errordir@/"
 
-    <Directory "@@ServerRoot@@/error">
+    <Directory "@@ServerRoot@@/@rel_errordir@">
         AllowOverride None
         Options IncludesNoExec
         AddOutputFilter Includes html
@@ -960,7 +960,7 @@ BrowserMatch "^WebDrive" redirect-carefully
 # To enable the cache as well, edit and uncomment the following lines:
 # (no cacheing without CacheRoot)
 #
-#CacheRoot "@@ServerRoot@@/proxy"
+#CacheRoot "@@ServerRoot@@/@rel_proxycachedir@"
 #CacheSize 5
 #CacheGcInterval 4
 #CacheMaxExpire 24
@@ -975,7 +975,7 @@ BrowserMatch "^WebDrive" redirect-carefully
 # Bring in additional module-specific configurations
 #
 <IfModule mod_ssl.c>
-    Include conf/ssl.conf
+    Include @rel_sysconfdir@/ssl.conf
 </IfModule>
 
 
@@ -1008,6 +1008,6 @@ BrowserMatch "^WebDrive" redirect-carefully
 #    ServerAdmin webmaster@dummy-host.example.com
 #    DocumentRoot /www/docs/dummy-host.example.com
 #    ServerName dummy-host.example.com
-#    ErrorLog logs/dummy-host.example.com-error_log
-#    CustomLog logs/dummy-host.example.com-access_log common
+#    ErrorLog @rel_logfiledir@/dummy-host.example.com-error_log
+#    CustomLog @rel_logfiledir@/dummy-host.example.com-access_log common
 #</VirtualHost>
index f72fa9f5df62565c57424aa780c119d874c809a1..bc503da670a9f3869b835f236c50ef967329419c 100644 (file)
 #include "os.h"
 #if !defined(WIN32) && !defined(NETWARE)
 #include "ap_config_auto.h"
+#include "ap_config_layout.h"
 #endif
 
-
 /* TODO - We need to put OS detection back to make all the following work */
 
 #if defined(SUNOS4) || defined(IRIX) || defined(NEXT) || defined(AUX3) \
diff --git a/include/ap_config_layout.h.in b/include/ap_config_layout.h.in
new file mode 100644 (file)
index 0000000..08f1de1
--- /dev/null
@@ -0,0 +1,97 @@
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2002 The Apache Software Foundation.  All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ *    if any, must include the following acknowledgment:
+ *       "This product includes software developed by the
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowledgment may appear in the software itself,
+ *    if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache" and "Apache Software Foundation" must
+ *    not be used to endorse or promote products derived from this
+ *    software without prior written permission. For written
+ *    permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ *    nor may "Apache" appear in their name, without prior written
+ *    permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */
+
+#ifndef AP_CONFIG_LAYOUT_H
+#define AP_CONFIG_LAYOUT_H
+
+/* Configured Apache directory layout */
+#define DEFAULT_PREFIX "@prefix@"
+#define DEFAULT_EXP_EXEC_PREFIX "@exp_exec_prefix@"
+#define DEFAULT_REL_EXEC_PREFIX "@rel_exec_prefix@"
+#define DEFAULT_EXP_BINDIR "@exp_bindir@"
+#define DEFAULT_REL_BINDIR "@rel_bindir@"
+#define DEFAULT_EXP_SBINDIR "@exp_sbindir@"
+#define DEFAULT_REL_SBINDIR "@rel_sbindir@"
+#define DEFAULT_EXP_LIBEXECDIR "@exp_libexecdir@"
+#define DEFAULT_REL_LIBEXECDIR "@rel_libexecdir@"
+#define DEFAULT_EXP_MANDIR "@exp_mandir@"
+#define DEFAULT_REL_MANDIR "@rel_mandir@"
+#define DEFAULT_EXP_SYSCONFDIR "@exp_sysconfdir@"
+#define DEFAULT_REL_SYSCONFDIR "@rel_sysconfdir@"
+#define DEFAULT_EXP_DATADIR "@exp_datadir@"
+#define DEFAULT_REL_DATADIR "@rel_datadir@"
+#define DEFAULT_EXP_INSTALLBUILDDIR "@exp_installbuilddir@"
+#define DEFAULT_REL_INSTALLBUILDDIR "@rel_installbuilddir@"
+#define DEFAULT_EXP_ERRORDIR "@exp_errordir@"
+#define DEFAULT_REL_ERRORDIR "@rel_errordir@"
+#define DEFAULT_EXP_ICONSDIR "@exp_iconsdir@"
+#define DEFAULT_REL_ICONSDIR "@rel_iconsdir@"
+#define DEFAULT_EXP_HTDOCSDIR "@exp_htdocsdir@"
+#define DEFAULT_REL_HTDOCSDIR "@rel_htdocsdir@"
+#define DEFAULT_EXP_MANUALDIR "@exp_manualdir@"
+#define DEFAULT_REL_MANUALDIR "@rel_manualdir@"
+#define DEFAULT_EXP_CGIDIR "@exp_cgidir@"
+#define DEFAULT_REL_CGIDIR "@rel_cgidir@"
+#define DEFAULT_EXP_INCLUDEDIR "@exp_includedir@"
+#define DEFAULT_REL_INCLUDEDIR "@rel_includedir@"
+#define DEFAULT_EXP_LOCALSTATEDIR "@exp_localstatedir@"
+#define DEFAULT_REL_LOCALSTATEDIR "@rel_localstatedir@"
+#define DEFAULT_EXP_RUNTIMEDIR "@exp_runtimedir@"
+#define DEFAULT_REL_RUNTIMEDIR "@rel_runtimedir@"
+#define DEFAULT_EXP_LOGFILEDIR "@exp_logfiledir@"
+#define DEFAULT_REL_LOGFILEDIR "@rel_logfiledir@"
+#define DEFAULT_EXP_PROXYCACHEDIR "@exp_proxycachedir@"
+#define DEFAULT_REL_PROXYCACHEDIR "@rel_proxycachedir@"
+
+#endif /* AP_CONFIG_LAYOUT_H */
index b5c983b2b89a88af928f4d8871b07c16354190db..7cc2aba4faf9c182d86f48566019576939f47bb5 100644 (file)
@@ -149,7 +149,7 @@ static int is_scriptaliased(request_rec *r)
 
 #define DEFAULT_LOGBYTES 10385760 
 #define DEFAULT_BUFBYTES 1024 
-#define DEFAULT_SOCKET "logs/cgisock"
+#define DEFAULT_SOCKET  DEFAULT_REL_RUNTIMEDIR "/cgisock"
 
 #define CGI_REQ 1
 #define SSI_REQ 2
index 8de87c3cbb12abefdcd225d7ddaccfc5cedf3889..586ec34b2b92ca7ab09767307b9e8d349c44f746 100644 (file)
@@ -98,7 +98,7 @@
                    
 /* Where the main/parent process's pid is logged */
 #ifndef DEFAULT_PIDLOG
-#define DEFAULT_PIDLOG "logs/httpd.pid"
+#define DEFAULT_PIDLOG DEFAULT_REL_RUNTIMEDIR "/httpd.pid"
 #endif
 
 /*
index 2874b347c3996e7cc1b5c63788f7974273bdb96f..48ce224629a3e19e2ff236886d40d9c6a5d10e25 100644 (file)
 
 /* File used for accept locking, when we use a file */
 #ifndef DEFAULT_LOCKFILE
-#define DEFAULT_LOCKFILE "logs/accept.lock"
+#define DEFAULT_LOCKFILE DEFAULT_REL_RUNTIMEDIR "/accept.lock"
 #endif
 
 /* Where the main/parent process's pid is logged */
 #ifndef DEFAULT_PIDLOG
-#define DEFAULT_PIDLOG "logs/httpd.pid"
+#define DEFAULT_PIDLOG DEFAULT_REL_RUNTIMEDIR "/httpd.pid"
 #endif
 
 /*
index 7ac40ab42e9cfe2ffc635ba81e91f4672e628bf7..3bf64a107a70ecf890db568edc03ff3c509487f7 100644 (file)
@@ -81,7 +81,7 @@
 
 /* Where the main/parent process's pid is logged */
 #ifndef DEFAULT_PIDLOG
-#define DEFAULT_PIDLOG "logs/httpd.pid"
+#define DEFAULT_PIDLOG DEFAULT_REL_RUNTIMEDIR "/httpd.pid"
 #endif
 
 /*
index 69348751adf62e6297ae75b3c5e1af60f3690e78..e1e864e742561222a7baab388c5987ef7a3aa9b5 100644 (file)
 #define DEFAULT_MIN_FREE_THREADS 10
 #endif
 
+/* Check for definition of DEFAULT_REL_RUNTIMEDIR */
+#ifndef DEFAULT_REL_RUNTIMEDIR
+#define DEFAULT_REL_RUNTIMEDIR "logs"
+#endif
+
 /* File used for accept locking, when we use a file */
 /*#ifndef DEFAULT_LOCKFILE
-  #define DEFAULT_LOCKFILE "logs/accept.lock"
+  #define DEFAULT_LOCKFILE DEFAULT_REL_RUNTIMEDIR "/accept.lock"
   #endif
 */
 
 /* Where the main/parent process's pid is logged */
 /*#ifndef DEFAULT_PIDLOG
-  #define DEFAULT_PIDLOG "logs/httpd.pid"
+  #define DEFAULT_PIDLOG DEFAULT_REL_RUNTIMEDIR "/httpd.pid"
   #endif
 */
 
index 2874b347c3996e7cc1b5c63788f7974273bdb96f..48ce224629a3e19e2ff236886d40d9c6a5d10e25 100644 (file)
 
 /* File used for accept locking, when we use a file */
 #ifndef DEFAULT_LOCKFILE
-#define DEFAULT_LOCKFILE "logs/accept.lock"
+#define DEFAULT_LOCKFILE DEFAULT_REL_RUNTIMEDIR "/accept.lock"
 #endif
 
 /* Where the main/parent process's pid is logged */
 #ifndef DEFAULT_PIDLOG
-#define DEFAULT_PIDLOG "logs/httpd.pid"
+#define DEFAULT_PIDLOG DEFAULT_REL_RUNTIMEDIR "/httpd.pid"
 #endif
 
 /*
index cd5cb38a361c541549f35f2ff6076bd3357326d4..54057ed3ef247d22e9a18a38496442a4cf233595 100644 (file)
 
 /* File used for accept locking, when we use a file */
 #ifndef DEFAULT_LOCKFILE
-#define DEFAULT_LOCKFILE "logs/accept.lock"
+#define DEFAULT_LOCKFILE DEFAULT_REL_RUNTIMEDIR "/accept.lock"
 #endif
 
 /* Where the main/parent process's pid is logged */
 #ifndef DEFAULT_PIDLOG
-#define DEFAULT_PIDLOG "logs/httpd.pid"
+#define DEFAULT_PIDLOG DEFAULT_REL_RUNTIMEDIR "/httpd.pid"
 #endif
 
 /*
index 1aaf0551171d8d03fbf54af249de9348937ae806..f74720e4daf8919032a7c325539d596e1f825c97 100644 (file)
@@ -184,8 +184,8 @@ static int die_now = 0;
 /* 
  * change directory for gprof to plop the gmon.out file
  * configure in httpd.conf:
- * GprofDir logs/   -> $ServerRoot/logs/gmon.out
- * GprofDir logs/%  -> $ServerRoot/logs/gprof.$pid/gmon.out
+ * GprofDir $RuntimeDir/   -> $ServerRoot/$RuntimeDir/gmon.out
+ * GprofDir $RuntimeDir/%  -> $ServerRoot/$RuntimeDir/gprof.$pid/gmon.out
  */
 static void chdir_for_gprof(void)
 {
@@ -210,7 +210,7 @@ static void chdir_for_gprof(void)
        }
     }
     else {
-       use_dir = ap_server_root_relative(pconf, "logs");
+       use_dir = ap_server_root_relative(pconf, DEFAULT_REL_RUNTIMEDIR);
     }
 
     chdir(use_dir);
index 7121298fb2bddc830c0d8f1867cc0d02c3305857..4ae413b914f6557d8a44b6c2150f73c0e3d74d26 100644 (file)
 #define DEFAULT_NUM_DAEMON 1
 #endif
 
+/* Check for definition of DEFAULT_REL_RUNTIMEDIR */
+#ifndef DEFAULT_REL_RUNTIMEDIR
+#define DEFAULT_REL_RUNTIMEDIR "logs"
+#endif
+
 /* Where the main/parent process's pid is logged */
 #ifndef DEFAULT_PIDLOG
-#define DEFAULT_PIDLOG "logs/httpd.pid"
+#define DEFAULT_PIDLOG DEFAULT_REL_RUNTIMEDIR "/httpd.pid"
 #endif
 
 /*
index b24fd177e04abed10cdf993b687855ec4e31e2d4..73be58a6096dd6f1439ea07497fd67bf08fe855d 100644 (file)
 
 /* File used for accept locking, when we use a file */
 #ifndef DEFAULT_LOCKFILE
-#define DEFAULT_LOCKFILE "logs/accept.lock"
+#define DEFAULT_LOCKFILE DEFAULT_REL_RUNTIMEDIR "/accept.lock"
 #endif
 
 /* Where the main/parent process's pid is logged */
 #ifndef DEFAULT_PIDLOG
-#define DEFAULT_PIDLOG "logs/httpd.pid"
+#define DEFAULT_PIDLOG DEFAULT_REL_RUNTIMEDIR "/httpd.pid"
 #endif
 
 /*
index e4496a1ac322a22907c8840cf1b314e138faa66a..b8c9ee659dac6bf8ed16be0366fedbd8e6ac1c5d 100644 (file)
@@ -26,14 +26,14 @@ ARGV="$@"
 # --------------------                              --------------------
 # 
 # the path to your PID file
-PIDFILE=@prefix@/logs/@progname@.pid
+PIDFILE=@exp_runtimedir@/@progname@.pid
 #
 # the path to your httpd binary, including options if necessary
-HTTPD='@prefix@/bin/@progname@'
+HTTPD='@exp_bindir@/@progname@'
 #
 # pick up any necessary environment variables
-if test -f @prefix@/bin/envvars; then
-  . @prefix@/bin/envvars
+if test -f @exp_bindir@/envvars; then
+  . @exp_bindir@/envvars
 fi
 #
 # a command that outputs a formatted text version of the HTML at the