官术网_书友最值得收藏!

Configuration

Once the server is installed, we can plan on customizing it to our environment and setting up the values that will facilitate effective functioning of the server.

There are several configuration parameters that can be configured or changed in the server, such as context root, email, ports, and so on. In this section, we will talk about a few important ones.

Changing the context root

The default context path for the portal is /portal , and the portal server responds onhttp://localhost:8080/portal . However, the context path can be changed to a path of your choice by editing the web server configuration file in both the bundled version as well as the binary sar versions. For source builds, the change needs to go into a property file before the server is built.

To change the context path in the configuration file, we will need to edit the file $JBOSS_HOME/server/default/deploy/jboss-portal.sar/portal-server.war/WEB-INF/jboss-web.xml

We then need to change the value of the element, <context-root> from portal to the desired value. As seen in the following screenshot, the value is changed from portal to archway:

Changing the context root

Once this file has been changed and saved and the server has been restarted, the portal server now responds on http:// localhost:8080/archway.

Changing the portal port

To change the default port setting, we need to edit the $JBOSS_HOME/server/default/deploy/jboss-web.deployer/server.xml file. Under the jboss.web service node, we need to change the value of the element <Connector port=> to port 80 .

The updated configuration is as follows:

Changing the portal port

It is important that when the port is changed, any dependencies such as remoting portlets or WSRP settings are also updated. We will talk about remote portlets in later sections of this chapter.

Setting email service

Emails are used for workflow processes, or to verify registered users. JBoss portal, by default, assumes an SMTP server on the local machine on which it runs. Sometimes, it is a good idea to set up email configuration during installation. To change the default setting, the $JBOSS_HOME/server/default/deploy/jboss-portal.sar/META-INF/jboss-service.xml file needs to be edited.

The MBean configuration for mail can be changed to point to a different mail gateway with appropriate authentication credentials.

The following figure shows an updated configuration using a remote SMTP server with a user ID and password.

Setting email service

Configuring proxies

Some of the portlets in the server, such as weather, stock tickers, and so on, require Internet access to request and present updated information. Similarly, to request and process RSS feeds, the server needs to access the Internet. Some enterprises do not have direct access to the Internet and require access through proxy servers.

The portal server can be configured to use proxies by adding the JAVA_OPTS environment variable to the portal server startup script when Java is invoked to start the JVM.

A typical setting option is as follows:

-Dhttp.proxyHost=proxy.xyz.net -Dhttp.proxyPort=8118
主站蜘蛛池模板: 河间市| 南溪县| 固镇县| 中方县| 太原市| 德昌县| 环江| 丘北县| 海城市| 万源市| 黄浦区| 杭锦后旗| 普洱| 襄垣县| 惠来县| 元阳县| 德格县| 汉阴县| 玉环县| 万全县| 太和县| 通山县| 钦州市| 玉溪市| 娱乐| 卓尼县| 南木林县| 丹凤县| 忻城县| 柯坪县| 铜梁县| 萍乡市| 冀州市| 元江| 邢台县| 蓝山县| 张家界市| 林甸县| 新源县| 瑞昌市| 湾仔区|