Where can i configure Network Ports a IPs?

By default Gentics CMS listens on all network devices on port 80. There are some scenaries in which it might be desirable to change the ip or a port. This overview will list all files that can be changed in order to achive the custom configuration.

This documentation only describes how the change the port for the old Gentics CMS package Apache. If you already migrated to a distribution Apache steps can be different.

1 IP and Port settings

1.1 /Node/apache/conf/ports.conf

This files contains the port setting for the apache webserver. The Apache webserver will bind to the defined port.

Please note that it is mandatory to update the tomcat configuration when the default listen configuration of the apache webserver was changed. It is recommended to allow the apache to listen on the loopback device since http://localhost/.Node/?do=24 is the default address that is used to load the internal system configuration. This address can be set in the /Node/etc/env.sh script.

Copy the line from /Node/bin/env.sh to /Node/etc/env.sh and change only the needed parameters.

/Node/etc/env.sh

  export JAVA_OPTS="-Dcom.gentics.contentnode.config.url=http://localhost/.Node/?do=24 -Xmx512m -Xms512m -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true"

The ip address of the host must be added to the $CN_CONFIG_ALLOWEDIPS array if the listen configuration is configured that way that the apache will no longer bind on localhost/127.0.0.1.

/Node/etc/node.conf

  $CN_CONFIG_ALLOWEDIPS = array('10.43.94.243', '127.0.0.1');

It is necessary to change the settings shown below when the default apache port was changed.

/Node/etc/node.conf

  $CN_LOCAL_SERVER = "http://IP:PORT";
  $PORTAL_CONNECT['url'] = $CN_LOCAL_SERVER.'/CNPortletapp/JavaParserInvoker';

1.2 /Node/etc/tomcat/gentics/contentnode.properties

In dieser Datei wird für den Tomcat definiert wie die URL zur Gentics CMS Benutzeroberfläche lautet.

2 Database settings

/Node/etc/node.conf:

  • Node Database

  $SETTINGS["dbtype"] = "mysql";
  $SETTINGS["db"] = "node_utf8";
  $SETTINGS["server"] = "localhost:42006:/Node/tmp/mysql.sock";
  $SETTINGS["login"] = "[BENUTZERNAME]";
  $SETTINGS["pw"] = "[PASSWORT]";
  $SETTINGS["charset"] = "utf8";
  • ContentRepository Databases:

The ContentRepository Databases can be configured using the Gentics CMS administation view. (Administration → Content.Admin → ContentRepositories)

3 Examples

3.1 Change Apache Port

The default webserver port for Gentics CMS should be changed from 80 to 501.

1. Modify /Node/apache/conf/ports.conf

Change


  Listen 80

to


  Listen 501

2. Modify /Node/etc/node.conf:


  $CN_LOCAL_SERVER = "http://127.0.0.1:501";
  $PORTAL_CONNECT['url'] = $CN_LOCAL_SERVER.'/CNPortletapp/JavaParserInvoker';

3. Modify /Node/etc/env.sh:


  export JAVA_OPTS="-Dcom.gentics.contentnode.config.url=http://127.0.0.1:501/.Node/?do=24 -Xmx1536m -Xms512m -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true"

3.2 Change Apache IP

Gentics CMS should not listen on all network devices. Instead it should only listen on the ip 192.168.10.9.

This is useful if the server also contains an additional webserver that is listening on another ip on the same port.

1. Modify /Node/etc/ports.conf:

Change


  Listen 80

to


  Listen 192.168.10.9:501

2. Modify /Node/etc/node.conf


   $CN_LOCAL_SERVER = "http://192.168.10.9:501";
   $PORTAL_CONNECT['url'] = $CN_LOCAL_SERVER.'/CNPortletapp/JavaParserInvoker';
   $CN_CONFIG_ALLOWEDIPS = array('192.168.10.9','127.0.0.1' );

3. Modify /Node/etc/env.sh


  export JAVA_OPTS="-Dcom.gentics.contentnode.config.url=http://192.168.10.9:501/.Node/?do=24 -Xmx1536m -Xms512m -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true"