在設定一個新的Liferay Portal時,一般會先去更改server.xml這個檔案

設定如下;

 

conf -> server.xml

這裡
<Connector port="8070" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" URIEncoding="UTF-8" />
<!-- A "Connector" using the shared thread pool-->
<!--
<Connector executor="tomcatThreadPool"
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
這裡
redirectPort="8433" URIEncoding="UTF-8" />
-->
<!-- Define a SSL HTTP/1.1 Connector on port 8443
This connector uses the JSSE configuration, when using APR, the
connector should be using the OpenSSL style configuration
described in the APR documentation -->
<!--
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
-->

<!-- Define an AJP 1.3 Connector on port 8009 -->
跟這裡
<Connector port="8008

 

1. 預設是8080Port,若需要更改則我自己習慣是加10或減10。

2. 這邊預設是8443,如果有更改則照上面的,十位數加10或減10。

3. 這邊預設8009,更改時照上面的加1或減1。

 

做好這設定後還需要在portal-ext.properties檔案加入以下;

redirect.url.security.mode=ip
redirect.url.domains.allowed=
redirect.url.ips.allowed=127.0.0.1,SERVER_IP

# domain name of web server
web.server.host=xxx.xxx.xx.xxx
# http port of web server
web.server.http.port=80
# https port of web server -- 這邊目前沒有在使用
web.server.https.port=443

 

這裡其實就是設定可允許連線的ip資料等等,還需要設定web server host,直接設定為目前使用的ip就可以

如果不設定的話,portlet在需要render頁面的時候可能會發生以下這種情形;

 

 

設定完成後,應該跳轉頁面就可以正常了。

 

參考資料: http://sushilsaini.wordpress.com/2013/08/20/configure-web-server-in-front-of-liferay/

文章標籤
全站熱搜
創作者介紹
創作者 squall75726 的頭像
squall75726

菜鳥工程師的Liferay Portal學習筆記

squall75726 發表在 痞客邦 留言(0) 人氣(480)