|
@@ -1,5 +1,6 @@
|
|
<%@ page import="password.pwm.http.JspUtility" %>
|
|
<%@ page import="password.pwm.http.JspUtility" %>
|
|
<%@ page import="password.pwm.http.tag.value.PwmValue" %>
|
|
<%@ page import="password.pwm.http.tag.value.PwmValue" %>
|
|
|
|
+<%@ page import="password.pwm.config.PwmSettingCategory" %>
|
|
<%--
|
|
<%--
|
|
~ Password Management Servlets (PWM)
|
|
~ Password Management Servlets (PWM)
|
|
~ http://www.pwm-project.org
|
|
~ http://www.pwm-project.org
|
|
@@ -51,27 +52,36 @@
|
|
</jsp:include>
|
|
</jsp:include>
|
|
<div id="centerbody">
|
|
<div id="centerbody">
|
|
<%@ include file="reference-nav.jsp"%>
|
|
<%@ include file="reference-nav.jsp"%>
|
|
- <h1>About the <%=PwmConstants.PWM_APP_NAME%> Environment</h1>
|
|
|
|
|
|
+ <h1><%=PwmConstants.PWM_APP_NAME%> Environment</h1>
|
|
|
|
+ <h2><code>ApplicationPath</code></h2>
|
|
|
|
+ <p>The application path setting is required. Configure the application path to use a directory on the local filesystem. <%=PwmConstants.PWM_APP_NAME%> will store it's
|
|
|
|
+ operating files in this directory. Specifically, the following contents will be stored in the application path:</p>
|
|
|
|
+ <ul>
|
|
|
|
+ <li>Configuration</li>
|
|
|
|
+ <li>LocalDB database</li>
|
|
|
|
+ <li>Log files</li>
|
|
|
|
+ <li>Backup data</li>
|
|
|
|
+ </ul>
|
|
<p>
|
|
<p>
|
|
- The <%=PwmConstants.PWM_APP_NAME%> application requires environment settings to load and run successfully. Specifically, an <b>application path</b> setting
|
|
|
|
- is required. The path value is given as a directory on the local file system. The pwm application must have full permissions to create, modify
|
|
|
|
- and delete folders in this directory.
|
|
|
|
|
|
+ The path value is given as an absolute directory path on the local file system. The <%=PwmConstants.PWM_APP_NAME%> application must have full permissions to create, modify and delete folders in this directory. The directory must already be exist when <%=PwmConstants.PWM_APP_NAME%> is started, it will not be
|
|
|
|
+ automatically created.
|
|
</p>
|
|
</p>
|
|
<p>
|
|
<p>
|
|
- Previous versions of <%=PwmConstants.PWM_APP_NAME%> did not require the application path to be set and would automatically use the exploded war directory's
|
|
|
|
- <code>WEB-INF</code> directory as the application path. This is no longer done automatically.
|
|
|
|
|
|
+ Older versions of <%=PwmConstants.PWM_APP_NAME%> did not require the application path to be set and would automatically use the exploded war directory's
|
|
|
|
+ <code>WEB-INF</code> directory as the application path. This is no longer done automatically, and having the application path be within the exploded war or anywhere in the application server's directory structure is
|
|
|
|
+ not recommended.
|
|
</p>
|
|
</p>
|
|
- <h1>Setting the Application Path</h1>
|
|
|
|
- These methods are used in this order until a value is found. The directory must already exist, and the application must have read and write privileges to that directory.
|
|
|
|
|
|
+ <h3>Setting the Application Path</h3>
|
|
|
|
+ The following configuration methods are evaluated by the application in this order until a value is found:
|
|
<ol>
|
|
<ol>
|
|
<li><a href="#webxml">Servlet <code>web.xml</code></a></li>
|
|
<li><a href="#webxml">Servlet <code>web.xml</code></a></li>
|
|
<li><a href="#property">Java System Property</a></li>
|
|
<li><a href="#property">Java System Property</a></li>
|
|
<li><a href="#envvar">Environment Variable</a></li>
|
|
<li><a href="#envvar">Environment Variable</a></li>
|
|
</ol>
|
|
</ol>
|
|
- <h2><a id="webxml">Servlet web.xml</a></h2>
|
|
|
|
- Modify the servlet <code>WEB-INF/web.xml</code> file. You will need to modify the application war file to accomplish this method. This method also accommodates multiple
|
|
|
|
- applications on a single application server. File paths may be absolute or relative to the base of the exploded application directory.
|
|
|
|
- <h3>Linux</h3>
|
|
|
|
|
|
+ <h3><a id="webxml">Servlet web.xml</a></h3>
|
|
|
|
+ Modify the servlet <code>WEB-INF/web.xml</code> file. You must modify the application war file to accomplish this method. This method accommodates multiple
|
|
|
|
+ applications on a single application server. File paths must be absolute.
|
|
|
|
+ <h4>Linux Example</h4>
|
|
<div class="codeExample">
|
|
<div class="codeExample">
|
|
<code>
|
|
<code>
|
|
<context-param><br/>
|
|
<context-param><br/>
|
|
@@ -81,7 +91,7 @@
|
|
</context-param><br/>
|
|
</context-param><br/>
|
|
</code>
|
|
</code>
|
|
</div>
|
|
</div>
|
|
- <h3>Windows</h3>
|
|
|
|
|
|
+ <h4>Windows Example</h4>
|
|
<div class="codeExample">
|
|
<div class="codeExample">
|
|
<code>
|
|
<code>
|
|
<context-param><br/>
|
|
<context-param><br/>
|
|
@@ -91,42 +101,70 @@
|
|
</context-param><br/>
|
|
</context-param><br/>
|
|
</code>
|
|
</code>
|
|
</div>
|
|
</div>
|
|
- <h3>Relative Location</h3>
|
|
|
|
- In this example a relative path is specified. Setting the value to <code>WEB-INF</code> mimics the behavior of older versions of the application.
|
|
|
|
- <div class="codeExample">
|
|
|
|
- <code>
|
|
|
|
- <context-param><br/>
|
|
|
|
- <description>...</description><br/>
|
|
|
|
- <param-name>applicationPath</param-name><br/>
|
|
|
|
- <param-value>WEB-INF</param-value><br/>
|
|
|
|
- </context-param><br/>
|
|
|
|
- </code>
|
|
|
|
- </div>
|
|
|
|
- <h2><a id="property">Java System Property</a></h2>
|
|
|
|
|
|
+ <h3><a id="property">Java System Property</a></h3>
|
|
<p>The application will read the java system property <b><%=PwmConstants.PWM_APP_NAME.toLowerCase()%>.applicationPath</b> variable to determine the location of
|
|
<p>The application will read the java system property <b><%=PwmConstants.PWM_APP_NAME.toLowerCase()%>.applicationPath</b> variable to determine the location of
|
|
the application path. Relative paths are not permitted. These example parameters would be added to the java command
|
|
the application path. Relative paths are not permitted. These example parameters would be added to the java command
|
|
line that starts the application server (tomcat) and java process.</p>
|
|
line that starts the application server (tomcat) and java process.</p>
|
|
- <h3>Linux</h3>
|
|
|
|
|
|
+ <h4>Linux Example</h4>
|
|
<div class="codeExample">
|
|
<div class="codeExample">
|
|
<code>-D<%=PwmConstants.PWM_APP_NAME.toLowerCase()%>.applicationPath='/home/user/<%=PwmConstants.PWM_APP_NAME.toLowerCase()%>-data'</code>
|
|
<code>-D<%=PwmConstants.PWM_APP_NAME.toLowerCase()%>.applicationPath='/home/user/<%=PwmConstants.PWM_APP_NAME.toLowerCase()%>-data'</code>
|
|
</div>
|
|
</div>
|
|
- <h3>Windows</h3>
|
|
|
|
|
|
+ <h4>Windows Example</h4>
|
|
<div class="codeExample">
|
|
<div class="codeExample">
|
|
<code>-D<%=PwmConstants.PWM_APP_NAME.toLowerCase()%>.applicationPath="c:\<%=PwmConstants.PWM_APP_NAME.toLowerCase()%>-data"</code>
|
|
<code>-D<%=PwmConstants.PWM_APP_NAME.toLowerCase()%>.applicationPath="c:\<%=PwmConstants.PWM_APP_NAME.toLowerCase()%>-data"</code>
|
|
</div>
|
|
</div>
|
|
- <h2><a id="envvar">Environment Variable</a></h2>
|
|
|
|
|
|
+ <h3><a id="envvar">Environment Variable</a></h3>
|
|
<p>The application will read the <b><%=PwmConstants.PWM_APP_NAME%>_APPLICATIONPATH</b> variable to determine the location of the application path. Relative paths are not permitted.</p>
|
|
<p>The application will read the <b><%=PwmConstants.PWM_APP_NAME%>_APPLICATIONPATH</b> variable to determine the location of the application path. Relative paths are not permitted.</p>
|
|
- <h3>Linux</h3>
|
|
|
|
|
|
+ <h3>Linux Example</h3>
|
|
<div class="codeExample">
|
|
<div class="codeExample">
|
|
<code>export <%=PwmConstants.PWM_APP_NAME%>_APPLICATIONPATH='/home/user/<%=PwmConstants.PWM_APP_NAME.toLowerCase()%>-data'</code>
|
|
<code>export <%=PwmConstants.PWM_APP_NAME%>_APPLICATIONPATH='/home/user/<%=PwmConstants.PWM_APP_NAME.toLowerCase()%>-data'</code>
|
|
</div>
|
|
</div>
|
|
- <h3>Windows</h3>
|
|
|
|
|
|
+ <p>This environment variable would typically be set as part of an init or other script file that starts your application server.</p>
|
|
|
|
+ <h4>Windows Example</h4>
|
|
<div class="codeExample">
|
|
<div class="codeExample">
|
|
<code>set "<%=PwmConstants.PWM_APP_NAME%>_APPLICATIONPATH=c:\<%=PwmConstants.PWM_APP_NAME.toLowerCase()%>-data"</code>
|
|
<code>set "<%=PwmConstants.PWM_APP_NAME%>_APPLICATIONPATH=c:\<%=PwmConstants.PWM_APP_NAME.toLowerCase()%>-data"</code>
|
|
</div>
|
|
</div>
|
|
- <br/><br/><br/><br/>
|
|
|
|
|
|
+ <p>This environment variable is typically set as part of a <code>.bat</code> file that starts your application server, or possibly as a system-wide environment variable via the windows control panel.</p>
|
|
|
|
+ <br/><br/>
|
|
|
|
+ <h2><code>ApplicationFlags</code></h2>
|
|
|
|
+ <p>Application flags can be set to enable or disable behaviors in <%=PwmConstants.PWM_APP_NAME%>. By default, no flags are set. Setting flags is optional. Flags are specified as a comma seperated
|
|
|
|
+ list of values. Values are case sensitive. In most cases, you will not need to set an application flag.
|
|
|
|
+ <table>
|
|
|
|
+ <tr><td><h3>Flag</h3></td><td><h3>Behavior</h3></td></tr>
|
|
|
|
+ <tr><td>ManageHttps</td><td>Enable the setting category <code><%=PwmSettingCategory.HTTPS_SERVER.getLabel(PwmConstants.DEFAULT_LOCALE)%></code></td></tr>
|
|
|
|
+ <tr><td>NoFileLock</td><td>Disable the file lock in the application path directory.</td></tr>
|
|
|
|
+ </table>
|
|
|
|
+ <h3>Linux Example</h3>
|
|
|
|
+ <div class="codeExample">
|
|
|
|
+ <code>export <%=PwmConstants.PWM_APP_NAME%>_APPLICATIONFLAGS='ManageHttps,NoFileLock'</code>
|
|
|
|
+ </div>
|
|
|
|
+ <br/><br/>
|
|
|
|
+ <h1>Environment Variable Names and Servlet Context</h1>
|
|
|
|
+ <p>
|
|
|
|
+ The environment variables listed above, such as <code><%=PwmConstants.PWM_APP_NAME%>_APPLICATIONPATH</code> and <code><%=PwmConstants.PWM_APP_NAME.toLowerCase()%>.applicationPath</code> assume the default context name of
|
|
|
|
+ <code>/<%=PwmConstants.PWM_APP_NAME.toLowerCase()%>/</code> is used. The context path will default to the war file name on most systems.
|
|
|
|
+ </p>
|
|
|
|
+ <p>
|
|
|
|
+ For non-default context names, or when there are multiple <%=PwmConstants.PWM_APP_NAME%> applications deployed on the same server, the environment variable must include the context. For example:
|
|
|
|
+ </p>
|
|
|
|
+ <table>
|
|
|
|
+ <tr>
|
|
|
|
+ <td><h3>Context</h3></td><td><h3>Environment Property Name</h3></td><td><h3>Environment Variable Name</h3></td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td><code>/<%=PwmConstants.PWM_APP_NAME.toLowerCase()%>/</code></td><td><code><%=PwmConstants.PWM_APP_NAME.toLowerCase()%>.applicationPath</code><br/>or<br/><code><%=PwmConstants.PWM_APP_NAME.toLowerCase()%>.<%=PwmConstants.PWM_APP_NAME.toLowerCase()%>.applicationPath</code></td><td><code><%=PwmConstants.PWM_APP_NAME%>_APPLICATIONPATH</code><br/>or<br/><code><%=PwmConstants.PWM_APP_NAME%>_<%=PwmConstants.PWM_APP_NAME%>_APPLICATIONPATH</code></td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td><code>/acme/</code></td><td><code><%=PwmConstants.PWM_APP_NAME.toLowerCase()%>.acme.applicationPath</code></td><td><code><%=PwmConstants.PWM_APP_NAME%>_ACME_APPLICATIONPATH</code></td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td><code>/acme2/</code></td><td><code><%=PwmConstants.PWM_APP_NAME.toLowerCase()%>.acme2.applicationPath</code></td><td><code><%=PwmConstants.PWM_APP_NAME%>_ACME2_APPLICATIONPATH</code></td>
|
|
|
|
+ </tr>
|
|
|
|
+ </table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<%@ include file="/WEB-INF/jsp/fragment/footer.jsp" %>
|
|
<%@ include file="/WEB-INF/jsp/fragment/footer.jsp" %>
|
|
|
|
+<br/>
|
|
|
|
+<br/>
|
|
</body>
|
|
</body>
|
|
</html>
|
|
</html>
|