Port 8080 is already in use
Port 8080 is the default port for Tomcat.
You can see it at the end of the default address http://localhost:8080.
If another application on the computer is already using the same port, you may need to change it.
-
Open
<CATALINA_HOME>/conf/server.xmlin a text editor. This file is under your Magnolia installation directory. -
Find the following section and set the value of
portto something other than8080(for example,8090):<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 --> <Connector port="8090" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" />
Change the defaultBaseUrl property, which is used to create absolute links in emails or other external systems.
To do this, you need to now access Magnolia at the new 8090 port.
-
Log into the author instance at
http://localhost:8090/magnoliaAuthor/.magnolia. -
Go to Configuration.
-
Set the
/server/defaultBaseUrlproperty tohttp://localhost:8090/magnolia/. -
Log into the public instance at
http://localhost:8090/magnoliaPublic/.magnolia. -
Go to Configuration.
-
Set the
/server/defaultBaseUrlproperty tohttp://localhost:8090/magnolia/.
Now the Welcome page at http://localhost:8090 has the correct URLs too.
|
The port also needs to be updated in the publishing configuration. Otherwise, publishing changes from the author to the public instance would fail.
-
On the author instance, go to Configuration > modules > publishing-core > config > receivers.
-
Under the
magnoliaPublic8080receiver, set theURLproperty tohttp://localhost:8090 magnoliaPublic. -
Rename the receiver to
magnoliaPublic8090. Publish the modified receiver including its subnodes.
If you want to run two different Tomcats simultaneously, you need to change other ports too.
This is useful if you want to run different versions of Magnolia at the same time.
In <CATALINA_HOME>/conf/server.xml, change the port numbers for the shutdown and AJP sections and any custom sections you have enabled.