From 4acb39cfad9924085fbc985866607a3dd10aa89c Mon Sep 17 00:00:00 2001
From: Endi Sukma Dewata <edewata@redhat.com>
Date: Mon, 20 May 2013 22:47:40 -0400
Subject: [PATCH] Renamed SERVER_ROOT into PKI_INSTANCE_PATH.

The SERVER_ROOT variable in RA and tps has been renamed into
PKI_INSTANCE_PATH to match the Tomcat-based subsystems.
---
 base/ra/apache/conf/httpd.conf    | 26 +++++++++++++-------------
 base/ra/apache/conf/nss.conf      | 18 +++++++++---------
 base/ra/apache/conf/perl.conf     | 10 +++++-----
 base/ra/etc/init.d/pki-rad        |  2 +-
 base/ra/setup/pkidaemon_registry  | 10 +++++-----
 base/ra/setup/registry_instance   | 10 +++++-----
 base/ra/shared/conf/CS.cfg.in     | 12 ++++++------
 base/setup/pkicreate              |  5 ++---
 base/tps/apache/conf/httpd.conf   | 30 +++++++++++++++---------------
 base/tps/apache/conf/nss.conf     | 18 +++++++++---------
 base/tps/apache/conf/perl.conf    |  4 ++--
 base/tps/etc/init.d/pki-tpsd      |  2 +-
 base/tps/setup/create.pl          | 10 +++++-----
 base/tps/setup/pkidaemon_registry | 10 +++++-----
 base/tps/setup/registry_instance  | 10 +++++-----
 base/tps/shared/conf/CS.cfg.in    | 20 ++++++++++----------
 16 files changed, 98 insertions(+), 99 deletions(-)

diff --git a/base/ra/apache/conf/httpd.conf b/base/ra/apache/conf/httpd.conf
index 656134637adac0db99ccf359c76d39edb84000e1..2c6cd185d71170908d3cf3691fcec5f9f9b40a0c 100644
--- a/base/ra/apache/conf/httpd.conf
+++ b/base/ra/apache/conf/httpd.conf
@@ -47,7 +47,7 @@
 #
 # Do NOT add a slash at the end of the directory path.
 #
-ServerRoot "[SERVER_ROOT]"
+ServerRoot "[PKI_INSTANCE_PATH]"
 
 #
 # The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
@@ -271,10 +271,10 @@ LoadModule cgi_module [FORTITUDE_LIB_DIR]/modules/mod_cgi.so
 </Location>
 
 #
-# Load config files from the config directory "[SERVER_ROOT]/conf".
+# Load config files from the config directory "[PKI_INSTANCE_PATH]/conf".
 #
 #Include conf.d/*.conf
-Include [SERVER_ROOT]/conf/perl.conf
+Include [PKI_INSTANCE_PATH]/conf/perl.conf
 
 #
 # ExtendedStatus controls whether Apache will generate "full" status
@@ -350,7 +350,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 "[SERVER_ROOT]/docroot"
+DocumentRoot "[PKI_INSTANCE_PATH]/docroot"
 
 #
 # Each directory to which Apache has access can be configured with respect
@@ -375,7 +375,7 @@ DocumentRoot "[SERVER_ROOT]/docroot"
 #
 # This should be changed to whatever you set DocumentRoot to.
 #
-<Directory "[SERVER_ROOT]/docroot">
+<Directory "[PKI_INSTANCE_PATH]/docroot">
 
 #
 # Possible values for the Options directive are "None", "All",
@@ -592,9 +592,9 @@ ServerSignature Off
 # We include the /icons/ alias for FancyIndexed directory listings.  If you
 # do not use FancyIndexing, you may comment this out.
 #
-Alias /icons/ "[SERVER_ROOT]/icons/"
+Alias /icons/ "[PKI_INSTANCE_PATH]/icons/"
 
-<Directory "[SERVER_ROOT]/icons">
+<Directory "[PKI_INSTANCE_PATH]/icons">
     Options Indexes MultiViews
     AllowOverride None
     Require all granted
@@ -605,9 +605,9 @@ Alias /icons/ "[SERVER_ROOT]/icons/"
 # the manual, even if you choose to move your DocumentRoot.  You may comment
 # this out if you do not care for the documentation.
 #
-AliasMatch ^/manual(?:/(?:de|en|es|fr|ja|ko|ru))?(/.*)?$ "[SERVER_ROOT]/manual$1"
+AliasMatch ^/manual(?:/(?:de|en|es|fr|ja|ko|ru))?(/.*)?$ "[PKI_INSTANCE_PATH]/manual$1"
 
-<Directory "[SERVER_ROOT]/manual">
+<Directory "[PKI_INSTANCE_PATH]/manual">
     Options Indexes
     AllowOverride None
     Require all granted
@@ -628,7 +628,7 @@ AliasMatch ^/manual(?:/(?:de|en|es|fr|ja|ko|ru))?(/.*)?$ "[SERVER_ROOT]/manual$1
 # The same rules about trailing "/" apply to ScriptAlias directives as to
 # Alias.
 #
-ScriptAlias /cgi-bin/ "[SERVER_ROOT]/cgi-bin/"
+ScriptAlias /cgi-bin/ "[PKI_INSTANCE_PATH]/cgi-bin/"
 
 <IfModule mod_cgid.c>
 #
@@ -639,10 +639,10 @@ ScriptAlias /cgi-bin/ "[SERVER_ROOT]/cgi-bin/"
 </IfModule>
 
 #
-# "[SERVER_ROOT]/cgi-bin" should be changed to whatever your ScriptAliased
+# "[PKI_INSTANCE_PATH]/cgi-bin" should be changed to whatever your ScriptAliased
 # CGI directory exists, if you have that configured.
 #
-<Directory "[SERVER_ROOT]/cgi-bin">
+<Directory "[PKI_INSTANCE_PATH]/cgi-bin">
     AllowOverride None
     Options ExecCGI
     Require all granted
@@ -1040,7 +1040,7 @@ BrowserMatch "^gnome-vfs" redirect-carefully
 #<IfModule mod_ssl.c>
 #    Include conf/ssl.conf
 #</IfModule>
-Include [SERVER_ROOT]/conf/nss.conf
+Include [PKI_INSTANCE_PATH]/conf/nss.conf
 
 ### Section 3: Virtual Hosts
 #
diff --git a/base/ra/apache/conf/nss.conf b/base/ra/apache/conf/nss.conf
index ccce188e346ca146100db5c1bc9a1860fd8584ed..38081b867d421c40950f68070ed1f24837114006 100644
--- a/base/ra/apache/conf/nss.conf
+++ b/base/ra/apache/conf/nss.conf
@@ -37,7 +37,7 @@ AddType application/x-pkcs7-crl    .crl
 #   The filtering dialog program (`builtin' is a internal
 #   terminal dialog) has to provide the pass phrase on stdout.
 #NSSPassPhraseDialog  builtin
-NSSPassPhraseDialog  defer:[SERVER_ROOT]/conf/password.conf
+NSSPassPhraseDialog  defer:[PKI_INSTANCE_PATH]/conf/password.conf
 
 
 #   Pass Phrase Helper:
@@ -84,8 +84,8 @@ NSSSession3CacheTimeout 86400
 #NSSOCSPDefaultName caCert 
 
 # mod_ssl logs to separate log files, you can choose to do that if you'd like
-ErrorLog [SERVER_ROOT]/logs/error_log
-TransferLog [SERVER_ROOT]/logs/access_log
+ErrorLog [PKI_INSTANCE_PATH]/logs/error_log
+TransferLog [PKI_INSTANCE_PATH]/logs/access_log
 
 #   SSL Engine Switch:
 #   Enable/Disable SSL for this virtual host.
@@ -106,7 +106,7 @@ NSSNickname "Server-Cert cert-[PKI_INSTANCE_ID]"
 #   The NSS security database directory that holds the certificates and
 #   keys. The database consists of 3 files: cert8.db, key3.db and secmod.db.
 #   Provide the directory that these files exist.
-NSSCertificateDatabase  [SERVER_ROOT]/alias
+NSSCertificateDatabase  [PKI_INSTANCE_PATH]/alias
 
 #   Client Authentication (Type):
 #   Client certificate verification type.  Types are none, optional and
@@ -166,7 +166,7 @@ NSSVerifyClient require
 #   Per-Server Logging:
 #   The home of a custom SSL log file. Use this when you want a
 #   compact non-error SSL logfile on a virtual host basis.
-#CustomLog [SERVER_ROOT]/logs/ssl_request_log \
+#CustomLog [PKI_INSTANCE_PATH]/logs/ssl_request_log \
 #          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
 
 </VirtualHost>                                  
@@ -179,8 +179,8 @@ NSSVerifyClient require
 #ServerAdmin you@example.com
 
 # mod_ssl logs to separate log files, you can choose to do that if you'd like
-ErrorLog [SERVER_ROOT]/logs/error_log
-TransferLog [SERVER_ROOT]/logs/access_log
+ErrorLog [PKI_INSTANCE_PATH]/logs/error_log
+TransferLog [PKI_INSTANCE_PATH]/logs/access_log
 
 #   SSL Engine Switch:
 #   Enable/Disable SSL for this virtual host.
@@ -201,7 +201,7 @@ NSSNickname "Server-Cert cert-[PKI_INSTANCE_ID]"
 #   The NSS security database directory that holds the certificates and
 #   keys. The database consists of 3 files: cert8.db, key3.db and secmod.db.
 #   Provide the directory that these files exist.
-NSSCertificateDatabase  [SERVER_ROOT]/alias
+NSSCertificateDatabase  [PKI_INSTANCE_PATH]/alias
 
 #   Client Authentication (Type):
 #   Client certificate verification type.  Types are none, optional and
@@ -261,7 +261,7 @@ NSSVerifyClient none
 #   Per-Server Logging:
 #   The home of a custom SSL log file. Use this when you want a
 #   compact non-error SSL logfile on a virtual host basis.
-#CustomLog [SERVER_ROOT]/logs/ssl_request_log \
+#CustomLog [PKI_INSTANCE_PATH]/logs/ssl_request_log \
 #          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
 
 </VirtualHost>                                  
diff --git a/base/ra/apache/conf/perl.conf b/base/ra/apache/conf/perl.conf
index 02a503f74d0f7116b645e270e3aeeab232a9b1ee..259808e75165862a005ae7d5e2c8e089625d55d0 100644
--- a/base/ra/apache/conf/perl.conf
+++ b/base/ra/apache/conf/perl.conf
@@ -53,8 +53,8 @@ LoadModule perl_module [FORTITUDE_LIB_DIR]/modules/mod_perl.so
 PerlModule ModPerl::Registry
 PerlModule [FORTITUDE_APACHE]::compat
 PerlModule PKI::RA::wizard
-PerlSetEnv PKI_DOCROOT [SERVER_ROOT]/docroot
-PerlSetEnv PKI_ROOT [SERVER_ROOT]
+PerlSetEnv PKI_DOCROOT [PKI_INSTANCE_PATH]/docroot
+PerlSetEnv PKI_ROOT [PKI_INSTANCE_PATH]
 <Location /ra/admin/console/config/wizard>
    SetHandler perl-script
    PerlHandler PKI::RA::Wizard
@@ -68,7 +68,7 @@ PerlSetEnv PKI_ROOT [SERVER_ROOT]
 </Location>
 
 PerlModule ModPerl::PerlRun
-Alias /ee/ [SERVER_ROOT]/docroot/ee/
+Alias /ee/ [PKI_INSTANCE_PATH]/docroot/ee/
 <Location /ee/ >
   SetHandler perl-script
   PerlHandler ModPerl::PerlRun
@@ -76,7 +76,7 @@ Alias /ee/ [SERVER_ROOT]/docroot/ee/
   PerlSendHeader On
 </Location>
 
-Alias /agent/ [SERVER_ROOT]/docroot/agent/
+Alias /agent/ [PKI_INSTANCE_PATH]/docroot/agent/
 <Location /agent/ >
   SetHandler perl-script
   PerlHandler ModPerl::PerlRun
@@ -84,7 +84,7 @@ Alias /agent/ [SERVER_ROOT]/docroot/agent/
   PerlSendHeader On
 </Location>
 
-Alias /admin/ [SERVER_ROOT]/docroot/admin/
+Alias /admin/ [PKI_INSTANCE_PATH]/docroot/admin/
 <Location /admin/ >
   SetHandler perl-script
   PerlHandler ModPerl::PerlRun
diff --git a/base/ra/etc/init.d/pki-rad b/base/ra/etc/init.d/pki-rad
index 666bf6387fff8ba9c5cbe725b39784a2afab165b..7da9775f90b369c4f3f21834db969842b88423b5 100755
--- a/base/ra/etc/init.d/pki-rad
+++ b/base/ra/etc/init.d/pki-rad
@@ -24,7 +24,7 @@
 # description:  Registration Authority (Apache)
 # processname:  pki-rad
 # piddir:       /var/run/pki/ra
-# config:       ${PKI_SERVER_ROOT}/conf/httpd.conf
+# config:       ${PKI_INSTANCE_PATH}/conf/httpd.conf
 
 PROG_NAME=`basename $0`
 SERVICE_NAME="pki-rad"
diff --git a/base/ra/setup/pkidaemon_registry b/base/ra/setup/pkidaemon_registry
index 9aa1eeaeef25a3a9c99202751b0c768130ffc05f..dee8f8dfd5528b9a664cf76cf508e9831b95d7e7 100644
--- a/base/ra/setup/pkidaemon_registry
+++ b/base/ra/setup/pkidaemon_registry
@@ -24,8 +24,8 @@ export PKI_INSTANCE_INITSCRIPT
 PKI_HTTPD_CONF=[HTTPD_CONF]
 export PKI_HTTPD_CONF
 
-PKI_SERVER_ROOT=[SERVER_ROOT]
-export PKI_SERVER_ROOT
+PKI_INSTANCE_PATH=[PKI_INSTANCE_PATH]
+export PKI_INSTANCE_PATH
 
 PKI_SYSTEM_USER_LIBRARIES=[SYSTEM_USER_LIBRARIES]
 export PKI_SYSTEM_USER_LIBRARIES
@@ -48,10 +48,10 @@ export PKI_PID_FILE
 PKI_SELINUX_TYPE="pki_ra_t"
 export PKI_SELINUX_TYPE
 
-pki_instance_configuration_file=${PKI_SERVER_ROOT}/conf/CS.cfg
+pki_instance_configuration_file=${PKI_INSTANCE_PATH}/conf/CS.cfg
 export pki_instance_configuration_file
 
-RESTART_SERVER=${PKI_SERVER_ROOT}/conf/restart_server_after_configuration
+RESTART_SERVER=${PKI_INSTANCE_PATH}/conf/restart_server_after_configuration
 export RESTART_SERVER
 
 ########################################################################
@@ -99,7 +99,7 @@ export PKI_INITLOG_ARGS
 httpd=${PKI_HTTPD}
 export httpd
 
-pki_logs_directory=${PKI_SERVER_ROOT}/logs
+pki_logs_directory=${PKI_INSTANCE_PATH}/logs
 export pki_logs_directory
 
 # see if httpd is linked with the openldap libraries - we need to override
diff --git a/base/ra/setup/registry_instance b/base/ra/setup/registry_instance
index 8fb0d6233571c3cbe4426b665e050ce5d30b3f6e..7bc001b1bc45a2d18c250c95362a208e90e027c5 100644
--- a/base/ra/setup/registry_instance
+++ b/base/ra/setup/registry_instance
@@ -21,8 +21,8 @@ export PKI_INSTANCE_INITSCRIPT
 PKI_HTTPD_CONF=[HTTPD_CONF]
 export PKI_HTTPD_CONF
 
-PKI_SERVER_ROOT=[SERVER_ROOT]
-export PKI_SERVER_ROOT
+PKI_INSTANCE_PATH=[PKI_INSTANCE_PATH]
+export PKI_INSTANCE_PATH
 
 PKI_SYSTEM_USER_LIBRARIES=[SYSTEM_USER_LIBRARIES]
 export PKI_SYSTEM_USER_LIBRARIES
@@ -45,10 +45,10 @@ export PKI_PID_FILE
 PKI_SELINUX_TYPE="pki_ra_t"
 export PKI_SELINUX_TYPE
 
-pki_instance_configuration_file=${PKI_SERVER_ROOT}/conf/CS.cfg
+pki_instance_configuration_file=${PKI_INSTANCE_PATH}/conf/CS.cfg
 export pki_instance_configuration_file
 
-RESTART_SERVER=${PKI_SERVER_ROOT}/conf/restart_server_after_configuration
+RESTART_SERVER=${PKI_INSTANCE_PATH}/conf/restart_server_after_configuration
 export RESTART_SERVER
 
 ########################################################################
@@ -96,7 +96,7 @@ export PKI_INITLOG_ARGS
 httpd=${PKI_HTTPD}
 export httpd
 
-pki_logs_directory=${PKI_SERVER_ROOT}/logs
+pki_logs_directory=${PKI_INSTANCE_PATH}/logs
 export pki_logs_directory
 
 # see if httpd is linked with the openldap libraries - we need to override
diff --git a/base/ra/shared/conf/CS.cfg.in b/base/ra/shared/conf/CS.cfg.in
index 17c339eed34e0bf082a81f97675f709dfae38699..ef4cfd5f24744fd8d0bc8ce73f42882bb589d617 100644
--- a/base/ra/shared/conf/CS.cfg.in
+++ b/base/ra/shared/conf/CS.cfg.in
@@ -16,8 +16,8 @@ request._001=# Request Queue Parameters
 request._002=#########################################
 agent.authorized_groups=administrators,agents
 admin.authorized_groups=administrators
-database.dbfile=[SERVER_ROOT]/conf/dbfile
-database.lockfile=[SERVER_ROOT]/conf/dblock
+database.dbfile=[PKI_INSTANCE_PATH]/conf/dbfile
+database.lockfile=[PKI_INSTANCE_PATH]/conf/dblock
 request.renewal.approve_request.0.ca=ca1
 request.renewal.approve_request.0.plugin=PKI::Request::Plugin::RequestToCA
 request.renewal.approve_request.0.profileId=caDualRAuserCert
@@ -97,7 +97,7 @@ request.server.approve_request.1.templateFile=mail_approve_request.vm
 request.server.reject_request.num_plugins=0
 cs.type=RA
 service.machineName=[SERVER_NAME]
-service.instanceDir=[SERVER_ROOT]
+service.instanceDir=[PKI_INSTANCE_PATH]
 service.securePort=[PKI_SECURE_PORT]
 service.non_clientauth_securePort=[NON_CLIENTAUTH_SECURE_PORT]
 service.unsecurePort=[PKI_UNSECURE_PORT]
@@ -144,13 +144,13 @@ logging._038=#                              chatty version of the above
 logging._039=#     10 - all logging
 logging._040=#########################################
 logging.debug.enable=true
-logging.debug.filename=[SERVER_ROOT]/logs/ra-debug.log
+logging.debug.filename=[PKI_INSTANCE_PATH]/logs/ra-debug.log
 logging.debug.level=7
 logging.audit.enable=true
-logging.audit.filename=[SERVER_ROOT]/logs/ra-audit.log
+logging.audit.filename=[PKI_INSTANCE_PATH]/logs/ra-audit.log
 logging.audit.level=10
 logging.error.enable=true
-logging.error.filename=[SERVER_ROOT]/logs/ra-error.log
+logging.error.filename=[PKI_INSTANCE_PATH]/logs/ra-error.log
 logging.error.level=10
 conn.ca1._000=#########################################
 conn.ca1._001=# CA connection
diff --git a/base/setup/pkicreate b/base/setup/pkicreate
index 9dffb8d9846367cd5f4beb92e5f504f80de674d4..acf32c08171493fe1835ab30161c74c5f804cb66 100755
--- a/base/setup/pkicreate
+++ b/base/setup/pkicreate
@@ -269,7 +269,6 @@ my $PROCESS_ID                 = "PROCESS_ID";
 my $NON_CLIENTAUTH_SECURE_PORT = "NON_CLIENTAUTH_SECURE_PORT";
 my $SECURITY_LIBRARIES         = "SECURITY_LIBRARIES";
 my $SERVER_NAME                = "SERVER_NAME";
-my $SERVER_ROOT                = "SERVER_ROOT";
 my $SYSTEM_LIBRARIES           = "SYSTEM_LIBRARIES";
 my $SYSTEM_USER_LIBRARIES      = "SYSTEM_USER_LIBRARIES";
 my $TMP_DIR                    = "TMP_DIR";
@@ -289,6 +288,7 @@ my $PKI_INSTANCE_ID_SLOT                = "PKI_INSTANCE_ID";
 my $PKI_REGISTRY_FILE_SLOT              = "PKI_REGISTRY_FILE";
 my $PKI_SECURE_PORT_SLOT                = "PKI_SECURE_PORT";
 my $PKI_UNSECURE_PORT_SLOT              = "PKI_UNSECURE_PORT";
+my $PKI_INSTANCE_PATH_SLOT              = "PKI_INSTANCE_PATH";
 
 # Template slot constants (CA, KRA, OCSP, TKS)
 my $INSTALL_TIME                        = "INSTALL_TIME";
@@ -296,7 +296,6 @@ my $PKI_AGENT_CLIENTAUTH_SLOT           = "PKI_AGENT_CLIENTAUTH";
 my $PKI_CERT_DB_PASSWORD_SLOT           = "PKI_CERT_DB_PASSWORD";
 my $PKI_CFG_PATH_NAME_SLOT              = "PKI_CFG_PATH_NAME";
 my $PKI_GROUP_SLOT                      = "PKI_GROUP";
-my $PKI_INSTANCE_PATH_SLOT              = "PKI_INSTANCE_PATH";
 my $PKI_INSTANCE_ROOT_SLOT              = "PKI_INSTANCE_ROOT";
 my $PKI_MACHINE_NAME_SLOT               = "PKI_MACHINE_NAME";
 my $PKI_RANDOM_NUMBER_SLOT              = "PKI_RANDOM_NUMBER";
@@ -2276,7 +2275,7 @@ sub process_pki_templates
         $slot_hash{$NON_CLIENTAUTH_SECURE_PORT} = $non_clientauth_secure_port;
         $slot_hash{$SECURITY_LIBRARIES}    = $default_security_libraries;
         $slot_hash{$SERVER_NAME}           = $host;
-        $slot_hash{$SERVER_ROOT}           = $pki_instance_path;
+        $slot_hash{$PKI_INSTANCE_PATH_SLOT}= $pki_instance_path;
         $slot_hash{$SYSTEM_LIBRARIES}      = $default_system_libraries;
         $slot_hash{$SYSTEM_USER_LIBRARIES} = $default_system_user_libraries;
         $slot_hash{$TMP_DIR}               = $tmp_dir;
diff --git a/base/tps/apache/conf/httpd.conf b/base/tps/apache/conf/httpd.conf
index 22778b0e1ca035bb82247a78810cd9e2e4457ab8..43c9bd64efeb33b8920ea401e45ccfaa342634dd 100644
--- a/base/tps/apache/conf/httpd.conf
+++ b/base/tps/apache/conf/httpd.conf
@@ -47,7 +47,7 @@
 #
 # Do NOT add a slash at the end of the directory path.
 #
-ServerRoot "[SERVER_ROOT]"
+ServerRoot "[PKI_INSTANCE_PATH]"
 
 #
 # The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
@@ -275,10 +275,10 @@ LoadModule tokendb_module     [FORTITUDE_MODULE]/mod_tokendb.so
 </Location>
 
 #
-# Load config files from the config directory "[SERVER_ROOT]/conf".
+# Load config files from the config directory "[PKI_INSTANCE_PATH]/conf".
 #
 #Include conf.d/*.conf
-Include [SERVER_ROOT]/conf/perl.conf
+Include [PKI_INSTANCE_PATH]/conf/perl.conf
 
 #
 # ExtendedStatus controls whether Apache will generate "full" status
@@ -354,7 +354,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 "[SERVER_ROOT]/docroot"
+DocumentRoot "[PKI_INSTANCE_PATH]/docroot"
 
 #
 # Each directory to which Apache has access can be configured with respect
@@ -379,7 +379,7 @@ DocumentRoot "[SERVER_ROOT]/docroot"
 #
 # This should be changed to whatever you set DocumentRoot to.
 #
-<Directory "[SERVER_ROOT]/docroot">
+<Directory "[PKI_INSTANCE_PATH]/docroot">
 
 #
 # Possible values for the Options directive are "None", "All",
@@ -585,9 +585,9 @@ ServerSignature Off
 # We include the /icons/ alias for FancyIndexed directory listings.  If you
 # do not use FancyIndexing, you may comment this out.
 #
-Alias /icons/ "[SERVER_ROOT]/icons/"
+Alias /icons/ "[PKI_INSTANCE_PATH]/icons/"
 
-<Directory "[SERVER_ROOT]/icons">
+<Directory "[PKI_INSTANCE_PATH]/icons">
     Options Indexes MultiViews
     AllowOverride None
     Require all granted
@@ -598,9 +598,9 @@ Alias /icons/ "[SERVER_ROOT]/icons/"
 # the manual, even if you choose to move your DocumentRoot.  You may comment
 # this out if you do not care for the documentation.
 #
-AliasMatch ^/manual(?:/(?:de|en|es|fr|ja|ko|ru))?(/.*)?$ "[SERVER_ROOT]/manual$1"
+AliasMatch ^/manual(?:/(?:de|en|es|fr|ja|ko|ru))?(/.*)?$ "[PKI_INSTANCE_PATH]/manual$1"
 
-<Directory "[SERVER_ROOT]/manual">
+<Directory "[PKI_INSTANCE_PATH]/manual">
     Options Indexes
     AllowOverride None
     Require all granted
@@ -621,7 +621,7 @@ AliasMatch ^/manual(?:/(?:de|en|es|fr|ja|ko|ru))?(/.*)?$ "[SERVER_ROOT]/manual$1
 # The same rules about trailing "/" apply to ScriptAlias directives as to
 # Alias.
 #
-ScriptAlias /cgi-bin/ "[SERVER_ROOT]/cgi-bin/"
+ScriptAlias /cgi-bin/ "[PKI_INSTANCE_PATH]/cgi-bin/"
 
 <IfModule mod_cgid.c>
 #
@@ -632,10 +632,10 @@ ScriptAlias /cgi-bin/ "[SERVER_ROOT]/cgi-bin/"
 </IfModule>
 
 #
-# "[SERVER_ROOT]/cgi-bin" should be changed to whatever your ScriptAliased
+# "[PKI_INSTANCE_PATH]/cgi-bin" should be changed to whatever your ScriptAliased
 # CGI directory exists, if you have that configured.
 #
-<Directory "[SERVER_ROOT]/cgi-bin">
+<Directory "[PKI_INSTANCE_PATH]/cgi-bin">
     AllowOverride None
     Options ExecCGI
     Require all granted
@@ -1033,11 +1033,11 @@ BrowserMatch "^gnome-vfs" redirect-carefully
 #<IfModule mod_ssl.c>
 #    Include conf/ssl.conf
 #</IfModule>
-Include [SERVER_ROOT]/conf/nss.conf
+Include [PKI_INSTANCE_PATH]/conf/nss.conf
 
-TPSConfigPathFile [SERVER_ROOT]/conf/CS.cfg
+TPSConfigPathFile [PKI_INSTANCE_PATH]/conf/CS.cfg
 
-TokendbConfigPathFile [SERVER_ROOT]/conf/CS.cfg
+TokendbConfigPathFile [PKI_INSTANCE_PATH]/conf/CS.cfg
 
 ### Section 3: Virtual Hosts
 #
diff --git a/base/tps/apache/conf/nss.conf b/base/tps/apache/conf/nss.conf
index 69063f8b1764eb886d7efaf6f76fb27a447534f5..80a407b809318b53499ddaeda26e07e54afcd3a8 100644
--- a/base/tps/apache/conf/nss.conf
+++ b/base/tps/apache/conf/nss.conf
@@ -37,7 +37,7 @@ AddType application/x-pkcs7-crl    .crl
 #   The filtering dialog program (`builtin' is a internal
 #   terminal dialog) has to provide the pass phrase on stdout.
 #NSSPassPhraseDialog  builtin
-NSSPassPhraseDialog  defer:[SERVER_ROOT]/conf/password.conf
+NSSPassPhraseDialog  defer:[PKI_INSTANCE_PATH]/conf/password.conf
 
 
 #   Pass Phrase Helper:
@@ -85,8 +85,8 @@ NSSSession3CacheTimeout 86400
 
 
 # mod_ssl logs to separate log files, you can choose to do that if you'd like
-ErrorLog [SERVER_ROOT]/logs/error_log
-TransferLog [SERVER_ROOT]/logs/access_log
+ErrorLog [PKI_INSTANCE_PATH]/logs/error_log
+TransferLog [PKI_INSTANCE_PATH]/logs/access_log
 
 #   SSL Engine Switch:
 #   Enable/Disable SSL for this virtual host.
@@ -113,7 +113,7 @@ NSSNickname "Server-Cert cert-[PKI_INSTANCE_ID]"
 #   The NSS security database directory that holds the certificates and
 #   keys. The database consists of 3 files: cert8.db, key3.db and secmod.db.
 #   Provide the directory that these files exist.
-NSSCertificateDatabase  [SERVER_ROOT]/alias
+NSSCertificateDatabase  [PKI_INSTANCE_PATH]/alias
 
 #   Client Authentication (Type):
 #   Client certificate verification type.  Types are none, optional and
@@ -173,7 +173,7 @@ NSSVerifyClient require
 #   Per-Server Logging:
 #   The home of a custom SSL log file. Use this when you want a
 #   compact non-error SSL logfile on a virtual host basis.
-#CustomLog [SERVER_ROOT]/logs/ssl_request_log \
+#CustomLog [PKI_INSTANCE_PATH]/logs/ssl_request_log \
 #          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
 
 </VirtualHost>                                  
@@ -186,8 +186,8 @@ NSSVerifyClient require
 #ServerAdmin you@example.com
 
 # mod_ssl logs to separate log files, you can choose to do that if you'd like
-ErrorLog [SERVER_ROOT]/logs/error_log
-TransferLog [SERVER_ROOT]/logs/access_log
+ErrorLog [PKI_INSTANCE_PATH]/logs/error_log
+TransferLog [PKI_INSTANCE_PATH]/logs/access_log
 
 #   SSL Engine Switch:
 #   Enable/Disable SSL for this virtual host.
@@ -214,7 +214,7 @@ NSSNickname "Server-Cert cert-[PKI_INSTANCE_ID]"
 #   The NSS security database directory that holds the certificates and
 #   keys. The database consists of 3 files: cert8.db, key3.db and secmod.db.
 #   Provide the directory that these files exist.
-NSSCertificateDatabase  [SERVER_ROOT]/alias
+NSSCertificateDatabase  [PKI_INSTANCE_PATH]/alias
 
 #   Client Authentication (Type):
 #   Client certificate verification type.  Types are none, optional and
@@ -274,7 +274,7 @@ NSSVerifyClient none
 #   Per-Server Logging:
 #   The home of a custom SSL log file. Use this when you want a
 #   compact non-error SSL logfile on a virtual host basis.
-#CustomLog [SERVER_ROOT]/logs/ssl_request_log \
+#CustomLog [PKI_INSTANCE_PATH]/logs/ssl_request_log \
 #          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
 
 </VirtualHost>                                  
diff --git a/base/tps/apache/conf/perl.conf b/base/tps/apache/conf/perl.conf
index a1a98c6a091aca6c89bdbd5000957e90f8638c51..60b502285dc19ead09f82298335188becddbdcee 100644
--- a/base/tps/apache/conf/perl.conf
+++ b/base/tps/apache/conf/perl.conf
@@ -53,8 +53,8 @@ LoadModule perl_module [FORTITUDE_LIB_DIR]/modules/mod_perl.so
 PerlModule ModPerl::Registry
 PerlModule [FORTITUDE_APACHE]::compat
 PerlModule PKI::TPS::wizard
-PerlSetEnv PKI_DOCROOT [SERVER_ROOT]/docroot
-PerlSetEnv PKI_ROOT [SERVER_ROOT]
+PerlSetEnv PKI_DOCROOT [PKI_INSTANCE_PATH]/docroot
+PerlSetEnv PKI_ROOT [PKI_INSTANCE_PATH]
 <Location /tps/admin/console/config/wizard>
    SetHandler perl-script
    PerlHandler PKI::TPS::Wizard
diff --git a/base/tps/etc/init.d/pki-tpsd b/base/tps/etc/init.d/pki-tpsd
index e5a213addca9e2a3d2f1968b3c8389839bdc9f21..b061d2af89010d8cf287fad45eb5eabb03babb07 100755
--- a/base/tps/etc/init.d/pki-tpsd
+++ b/base/tps/etc/init.d/pki-tpsd
@@ -24,7 +24,7 @@
 # description:  Token Processing System (Apache)
 # processname:  pki-tpsd
 # piddir:       /var/run/pki/tps
-# config:       ${PKI_SERVER_ROOT}/conf/httpd.conf
+# config:       ${PKI_INSTANCE_PATH}/conf/httpd.conf
 
 PROG_NAME=`basename $0`
 SERVICE_NAME="pki-tpsd"
diff --git a/base/tps/setup/create.pl b/base/tps/setup/create.pl
index feac2af8e7fe0e98adc360b8f6d8417b766bf584..eb631b27c848e01667d3253779a0840313bf57af 100755
--- a/base/tps/setup/create.pl
+++ b/base/tps/setup/create.pl
@@ -114,7 +114,7 @@ sub PromptUser
   print ("************************************************\n");
   print ("\n");
 
-ASK_SERVER_ROOT:
+ASK_PKI_INSTANCE_PATH:
   print ("Enter the path to the server root [$defaultServerRoot]: ");
   chomp ($serverRoot = <STDIN>);
   if ($serverRoot eq "") {
@@ -122,15 +122,15 @@ ASK_SERVER_ROOT:
   }
   if ($serverRoot =~ /\/$/) {
     print ("Error: '$serverRoot' cannot end with '/'.\n");
-    goto ASK_SERVER_ROOT;
+    goto ASK_PKI_INSTANCE_PATH;
   }
   if (!(-d $serverRoot)) {
     print ("Error: '$serverRoot' directory does not exit.\n");
-    goto ASK_SERVER_ROOT;
+    goto ASK_PKI_INSTANCE_PATH;
   }
   if (!(-f "$serverRoot/admin-serv/config/adm.conf")) {
     print ("Error: '$serverRoot' directory does not contain $serverRoot/admin-serv/config/adm.conf.\n");
-    goto ASK_SERVER_ROOT;
+    goto ASK_PKI_INSTANCE_PATH;
   }
 
   # read some good parameters from adm.conf
@@ -674,7 +674,7 @@ sub CopyTemplate
   open(IN, "<$from");
   open(OUT, ">$to");
   while (<IN>) {
-    s/\[SERVER_ROOT\]/$serverRoot/g;
+    s/\[PKI_INSTANCE_PATH\]/$serverRoot/g;
     s/\[INSTANCE_ID\]/$instanceID/g;
     s/\[SERVER_NAME\]/$serverName/g;
     s/\[PORT\]/$port/g;
diff --git a/base/tps/setup/pkidaemon_registry b/base/tps/setup/pkidaemon_registry
index cac9b3c4890d16bcc1e15f54b4108cf93c0a98ec..f74f6c83ceae27e97367d7f3da2f42fe20139bfb 100644
--- a/base/tps/setup/pkidaemon_registry
+++ b/base/tps/setup/pkidaemon_registry
@@ -24,8 +24,8 @@ export PKI_INSTANCE_INITSCRIPT
 PKI_HTTPD_CONF=[HTTPD_CONF]
 export PKI_HTTPD_CONF
 
-PKI_SERVER_ROOT=[SERVER_ROOT]
-export PKI_SERVER_ROOT
+PKI_INSTANCE_PATH=[PKI_INSTANCE_PATH]
+export PKI_INSTANCE_PATH
 
 PKI_SYSTEM_USER_LIBRARIES=[SYSTEM_USER_LIBRARIES]
 export PKI_SYSTEM_USER_LIBRARIES
@@ -48,10 +48,10 @@ export PKI_PID_FILE
 PKI_SELINUX_TYPE="pki_tps_t"
 export PKI_SELINUX_TYPE
 
-pki_instance_configuration_file=${PKI_SERVER_ROOT}/conf/CS.cfg
+pki_instance_configuration_file=${PKI_INSTANCE_PATH}/conf/CS.cfg
 export pki_instance_configuration_file
 
-RESTART_SERVER=${PKI_SERVER_ROOT}/conf/restart_server_after_configuration
+RESTART_SERVER=${PKI_INSTANCE_PATH}/conf/restart_server_after_configuration
 export RESTART_SERVER
 
 ########################################################################
@@ -99,7 +99,7 @@ export PKI_INITLOG_ARGS
 httpd=${PKI_HTTPD}
 export httpd
 
-pki_logs_directory=${PKI_SERVER_ROOT}/logs
+pki_logs_directory=${PKI_INSTANCE_PATH}/logs
 export pki_logs_directory
 
 # see if httpd is linked with the openldap libraries - we need to override
diff --git a/base/tps/setup/registry_instance b/base/tps/setup/registry_instance
index 3c0f5eb4e6700f3c251d4f539f2ec76c8e254d87..040beba683fc086cd2b88c7a77548d21ca6398c7 100644
--- a/base/tps/setup/registry_instance
+++ b/base/tps/setup/registry_instance
@@ -21,8 +21,8 @@ export PKI_INSTANCE_INITSCRIPT
 PKI_HTTPD_CONF=[HTTPD_CONF]
 export PKI_HTTPD_CONF
 
-PKI_SERVER_ROOT=[SERVER_ROOT]
-export PKI_SERVER_ROOT
+PKI_INSTANCE_PATH=[PKI_INSTANCE_PATH]
+export PKI_INSTANCE_PATH
 
 PKI_SYSTEM_USER_LIBRARIES=[SYSTEM_USER_LIBRARIES]
 export PKI_SYSTEM_USER_LIBRARIES
@@ -45,10 +45,10 @@ export PKI_PID_FILE
 PKI_SELINUX_TYPE="pki_tps_t"
 export PKI_SELINUX_TYPE
 
-pki_instance_configuration_file=${PKI_SERVER_ROOT}/conf/CS.cfg
+pki_instance_configuration_file=${PKI_INSTANCE_PATH}/conf/CS.cfg
 export pki_instance_configuration_file
 
-RESTART_SERVER=${PKI_SERVER_ROOT}/conf/restart_server_after_configuration
+RESTART_SERVER=${PKI_INSTANCE_PATH}/conf/restart_server_after_configuration
 export RESTART_SERVER
 
 ########################################################################
@@ -96,7 +96,7 @@ export PKI_INITLOG_ARGS
 httpd=${PKI_HTTPD}
 export httpd
 
-pki_logs_directory=${PKI_SERVER_ROOT}/logs
+pki_logs_directory=${PKI_INSTANCE_PATH}/logs
 export pki_logs_directory
 
 # see if httpd is linked with the openldap libraries - we need to override
diff --git a/base/tps/shared/conf/CS.cfg.in b/base/tps/shared/conf/CS.cfg.in
index 40e4eb8cfcd19101ae5b0477fa67dc91e67bbc06..00bfba9dedab526497710a7fd9da1701a1349741 100644
--- a/base/tps/shared/conf/CS.cfg.in
+++ b/base/tps/shared/conf/CS.cfg.in
@@ -24,7 +24,7 @@ selftests._008=##
 selftests.container.logger.enable=true
 selftests.container.logger.expirationTime=0
 selftests.container.logger.file.type=RollingLogFile
-selftests.container.logger.fileName=[SERVER_ROOT]/logs/selftests.log
+selftests.container.logger.fileName=[PKI_INSTANCE_PATH]/logs/selftests.log
 selftests.container.logger.level=10
 selftests.container.logger.maxFileSize=2000
 selftests.container.logger.rolloverInterval=2592000
@@ -33,7 +33,7 @@ selftests.container.order.onDemand=TPSPresence:critical, TPSValidity:critical, T
 selftests.plugin.TPSPresence.nickname=[HSM_LABEL][NICKNAME]
 selftests.plugin.TPSValidity.nickname=[HSM_LABEL][NICKNAME]
 service.machineName=[SERVER_NAME]
-service.instanceDir=[SERVER_ROOT]
+service.instanceDir=[PKI_INSTANCE_PATH]
 service.securePort=[PKI_SECURE_PORT]
 service.non_clientauth_securePort=[NON_CLIENTAUTH_SECURE_PORT]
 service.unsecurePort=[PKI_UNSECURE_PORT]
@@ -90,15 +90,15 @@ logging._048=# logging.*.expirationTime:
 logging._049=#    - maximum age of log, older unmodified logs are deleted( in seconds, 0 to disable)
 logging._050=#########################################
 logging.debug.enable=true
-logging.debug.filename=[SERVER_ROOT]/logs/tps-debug.log
+logging.debug.filename=[PKI_INSTANCE_PATH]/logs/tps-debug.log
 logging.debug.level=10
 logging.debug.file.type=RollingLogFile
 logging.debug.maxFileSize=2000
 logging.debug.rolloverInterval=2592000
 logging.debug.expirationTime=0
 logging.audit.enable=true
-logging.audit.filename=[SERVER_ROOT]/logs/tps-audit.log
-logging.audit.signedAuditFilename=[SERVER_ROOT]/logs/signedAudit/tps_audit
+logging.audit.filename=[PKI_INSTANCE_PATH]/logs/tps-audit.log
+logging.audit.signedAuditFilename=[PKI_INSTANCE_PATH]/logs/signedAudit/tps_audit
 logging.audit.level=10
 logging.audit.logSigning=false
 logging.audit.signedAuditCertNickname=auditSigningCert cert-[PKI_INSTANCE_ID]
@@ -112,7 +112,7 @@ logging.audit.maxFileSize=2000
 logging.audit.rolloverInterval=2592000
 logging.audit.expirationTime=0
 logging.error.enable=true
-logging.error.filename=[SERVER_ROOT]/logs/tps-error.log
+logging.error.filename=[PKI_INSTANCE_PATH]/logs/tps-error.log
 logging.error.level=10
 logging.error.file.type=RollingLogFile
 logging.error.maxFileSize=2000
@@ -308,7 +308,7 @@ auth.instance.1.libraryName=[SYSTEM_USER_LIBRARIES]/tps/[LIB_PREFIX]ldapauth[OBJ
 auth.instance.1.libraryFactory=GetAuthentication
 auth.instance.1.authId=ldap2
 auth.instance.1.bindDN=cn=Directory Manager
-auth.instance.1.bindPWD=[SERVER_ROOT]/conf/password.conf
+auth.instance.1.bindPWD=[PKI_INSTANCE_PATH]/conf/password.conf
 auth.instance.1.hostport=[TOKENDB_HOST]:[TOKENDB_PORT]
 auth.instance.1.SSLOn=false
 auth.instance.1.retries=1
@@ -1490,12 +1490,12 @@ tokendb._072=#     TOKEN_FOUND =4,
 tokendb._073=#     TOKEN_TEMP_LOST_PERM_LOST =5,
 tokendb._074=#     TOKEN_TERMINATED = 6
 tokendb._075=#########################################
-tokendb.auditLog=[SERVER_ROOT]/logs/tokendb-audit.log
+tokendb.auditLog=[PKI_INSTANCE_PATH]/logs/tokendb-audit.log
 tokendb.hostport=[TOKENDB_HOST]:[TOKENDB_PORT]
 tokendb.ssl=false
 tokendb.bindDN=cn=Directory Manager
-tokendb.bindPassPath=[SERVER_ROOT]/conf/password.conf
-tokendb.templateDir=[SERVER_ROOT]/docroot/tus
+tokendb.bindPassPath=[PKI_INSTANCE_PATH]/conf/password.conf
+tokendb.templateDir=[PKI_INSTANCE_PATH]/docroot/tus
 tokendb.userBaseDN=[TOKENDB_ROOT]
 tokendb.baseDN=ou=Tokens,[TOKENDB_ROOT]
 tokendb.activityBaseDN=ou=Activities,[TOKENDB_ROOT]
-- 
1.8.1.4

