Learn the powerful enterprise adaptable database:
Getting Started With ADABAS & Natural
Friday, July 26, 2013
Liferay 6.0.6 Tomcat Bundle: Using Apache with mod_proxy
1) Edit Apache Confuguration.
a) Using UwAmp, click Apache Config button.
b) Ensure that the following modules are selected:
c) Using UwAmp, click Apache Config Code editor Button.
d) Add codes at the bottom of the existing codes:
# Put this in the main section of your configuration (or desired virtual host, if using Apache virtual hosts)
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://localhost:8080
ProxyPassReverse / http://localhost:8080
<Location />
Order allow,deny
Allow from all
</Location>
2) Edit Tomcat server.xml
a) Using Notepad++, locate line no. 69 for connector section.
b) Add proxyName and proxyPort values.
3) Start Tomcat server.
a) Using File Explorer, find the path to your Tomcat Bin folder. Copy the path.
b) Open Command Prompt window, change directory to path in (a).
c) In Command Prompt window, run startup.
d) Browse URL http://localhost.
Notice that the port 8080 no longer appears in the Addess Bar.
Additional exercise:
Suppose you want to create a virtual host for liferay.local
1) While you are in Liferay Control Panel (using http://localhost), change portal instance setting to use virtual host name liferay.local.
2) Logout from liferay and close browser window.
3) Using UwAmp,
a) Click Apache Config button.
b) Edit Virtual Hosts.
Click +.
Click the iteam localost *:80
Click Server Name
Change the name to liferay.local
Click + Under Others Section and you will see "enter your custom setting here"
Click OK.
Click Apache Config Code editor Button.
Locate "enter your custom setting here"
Replace with:
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://liferay.local:8080
ProxyPassReverse / http://liferay.local:8080
<Location />
Order allow,deny
Allow from all
</Location>
4) Edit server.xml
Replace localhost with liferay.local.
5) Restart Tomcat
REFERENCE:
https://confluence.atlassian.com/display/DOC/Using+Apache+with+mod_proxy
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment