Split standalone.xml Configuration file - jboss7.x

Is there a way to import another file into standalone.xml file, like for exemple import in Spring configuration files ?

If nothing else you can make use of external entities:
<!DOCTYPE domain [
<!ENTITY section1 SYSTEM "section1.xml">
]>
and then use &section1; to include it at the appropriate place.

Related

Puppet Disable HTTP Trace in Apache on a Single Node

I struggle to find a way to disable the trace/track option on one of my RHEL7 servers which is controlled by puppet.
I'm using apache module of puppetlabs.
I want to disable TraceEnable in the httpd.conf file on a single server and not to all servers managed by puppet.
The directive I need to add using puppet is:
TraceEnable Off
I have the YAML file for the server in the location:
/etc/puppetlabs/code/environments/test/data/node/server1.yaml
I can edit this file to apply the config on this server only but I don't know what to put in it.
How to call the HTTP module and how to right the directive in the YAML file?
The reference documentation for the puppetlabs-apache module is available from the Puppet Forge. It would tell you that the main class of that module (apache) has a parameter trace_enable, which controls exactly the httpd configuration property you want to manage:
Controls how Apache handles TRACE requests (per RFC 2616) via the
TraceEnable directive.
Default value: 'On'
Provided that your manifest set is not explicitly specifying a value for that parameter, you should be able to customize it on a per-node basis by setting the apache::trace_enable key in node-specific hiera data. For example, if the node specific data for the node you want to configure is environments/production/data/node/server1.yaml, then in that file, include the line
apache::trace_enable: 'Off'

How to configure address of WSDL URL in Apache Axis2?

I am using Axis2 and Tomcat8.5. My WSDL URL is : http://localhost:8080/axis2/services/Myapp.
But i want it to configure like this: http://localhost:8080/phase/axis2/services/Myapp.
You just have to rename your WAR file or XML context file. E.g. if your WAR file is named axis2.war change it to phase#axis2.war. If you use XML file axis2.xml, rename accordingly to phase#axis2.xml.
https://tomcat.apache.org/tomcat-8.5-doc/config/context.html#Naming

Can I configure directory listings and MIME type mappings from command line?

I want to publish a directory of static files alongside my application on GlassFish 3.1; in order to do that, I have to enable directory listings and add a custom MIME type mapping. Since this will only be needed in some installations, I want to do the configuration on the server instead of putting it in the application.
Both can be achieved by editing the default-web.xml file in the domain configuration.
To enable directory listings I have to change the listings parameter to true inside the servlet block:
<servlet>
<!-- more stuff -->
<init-param>
<param-name>listings</param-name>
<param-value>true</param-value>
</init-param>
<!-- more stuff -->
</servlet>
To add a MIME type mapping I have to add a block like this one:
<mime-mapping>
<extension>ext</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
I'd like to do this from a script so that I can reproduce the installation as needed.
Is there a way to change these configurations using asadmin or some other command line tool?
Asadmin does not provide element level access to default-web.xml. That said, you may just want to have an alternate copy of default-web.xml and then use a script to replace the 'shipped' version with the customized version.

Tomcat URL prefix

I got following URL
http://SOMEURL/PREFIX/servlet/test.Home
I thought that PREFIX has something to do with, the <Context path="/PREFIX"> entry. So if i wouldnt set the path it would disappear but it isnt like this. Prefix is still needed.
Because in my html documents i got some Paths to some css Files, which are in the Base Web Content directory under WebContent/css.
And with this prefix they arent founy anymore because it tries to find them in /PREFIX/css..
Should i just create a directory similar to the WebContent directory with PREFIX as name?
If you want your webapp to be deployed on /PREFIX then you should:
Put your <Context> element in your webapp's META-INF/context.xml
Not use the prefix attribute in your <Context>
Name your WAR file PREFIX.war
If you want your webapp to be deployed on / (that is, with no prefix), then name your WAR file to ROOT.war (case matters: use capitals for ROOT).

Is it possible to alias Glassfish requests like in Apache?

I want to redirect requests to /program.fcgi? to the actual location on the filesystem which is /usr/local/.../program.fcgi?. In Apache I can add the following to the configuration file
Alias /program /usr/local/.../program
How do I do the same in Glassfish?
Glassfish lets you include a sun-web.xml in WEB-INF of your web application that allows you to provide alternate docroots
An example entry would look like :
<property name="alternatedocroot_1" value="from=*.jsp dir=path_to_directory"/>
Details here