Liferay DXP Setup
Apache Tomcat
Set the properties in {Liferay Server folder}/portal-ext.properties
file and save it.
json.service.auth.token.hosts.allowed=127.0.0.1,SERVER_IP
json.service.auth.token.enabled=false
jsonws.web.service.public.methods=*
jsonws.servlet.hosts.allowed=127.0.0.1,SERVER_IP
Now start the liferay server & create the blank new site & import the downloaded LAR file.
Create the one folder for the website with any name and paste the downloaded files and folder except LAR & README.md and move the website folder to Apache Tomcat Root directory.
{Tomcat installation folder}\webapps\ROOT
Locate server.xml
in {Tomcat installation folder}\conf
Find following similar statement
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8444" />
Change the Connector port=”8080″ port to any other port number.
<Connector port="8081" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8444" />
Now Tomcat server runs on port 8081.
Edit and save the server.xml
file and start Tomcat server.
{Tomcat installation folder}\bin\startup.bat
Open the js/jax-custom.js
file in any editor and update the liferay portal username and password.
// Define option defaults
var defaults = {
username: "test@liferay.com",
password: "test",
...
}
Run the website URL
http://localhost:8081/WEBSITEFOLDERNAME/
Now open a Liferay site and edit & publish the webcontent.
Refresh the website page.