Running PaperCut NG on port 80 (or another port)

KB Home   |   Running PaperCut NG on port 80 (or another port)

Main.RunningOnPort80 History

Hide minor edits - Show changes to output

September 15, 2017, at 02:39 AM by 139.130.165.134 -
September 15, 2017, at 02:29 AM by 139.130.165.134 -
Added lines 83-86:

'''Important:''' Do not override the Host header when setting up a proxy in front of PaperCut MF or PaperCut NG,  as it will conflict with HTTP header origin checks (CSRF) security checks, rely on "X-Forwarded-Host" instead. For example, when using mod_proxy with Apache, do not use "mod_rewrite" to change the HOST header.

If you really have to rewrite the Host header, then the CSFR checks can be disabled using the "server.csrf-check.validate-request-origin" configuration in server.properties.
May 16, 2017, at 03:49 AM by peterf - Updated to reflect 17.1 release
Added lines 5-6:
Another would be to facilitate PaperCut NG and PaperCut MF's support for HSTS, or HTTP Strict Transport Security, introduced in version 17.1. HSTS relies upon port 443 being available for secure HTTPS connections, as this is the port that supported web browsers will automatically redirect to when unwanted access over cleartext HTTP is attempted. If port 443 is not enabled for the application when HSTS is turned on, this would result in these redirections failing.
Deleted lines 12-13:

Added line 40:
Changed lines 55-56 from:
    Note: For those who have upgraded from previous versions of the software to 12.5 or newer, these lines will not
   
be present. They can simply be added to the [app path]\server\server.properties file.
to:
-->Note: For those who have upgraded from previous versions of the software to 12.5 or newer, these lines will not be present. They can simply be added to the [app path]\server\server.properties file.
Changed line 77 from:
* The print provider config file located at: [@C:\Program Files\PaperCut NG\providers\print\win\print-provider.conf@] (the print provider service must be restarted) You will need to set the correct port by changing the following configuration field: @@ApplicationServerPort@@ in the config file.  It is required to remove the hash "#" in front of the configuration key to apply the setting.
to:
* The print provider config file located at: [@C:\Program Files\PaperCut NG\providers\print\win\print-provider.conf@] (the print provider service must be restarted) You will need to set the correct port by changing the following configuration field: [@ApplicationServerPort@] in the config file.  It is required to remove the hash "#" in front of the configuration key to apply the setting.
Changed line 77 from:
* The print provider config file located at: [@C:\Program Files\PaperCut NG\providers\print\win\print-provider.conf@] (the print provider service must be restarted) You will need to set the correct port by changing the following configuration field: @@"ApplicationServerPort"@@ in the config file.  It is required to remove the hash "#" in front of the configuration key to apply the setting.
to:
* The print provider config file located at: [@C:\Program Files\PaperCut NG\providers\print\win\print-provider.conf@] (the print provider service must be restarted) You will need to set the correct port by changing the following configuration field: @@ApplicationServerPort@@ in the config file.  It is required to remove the hash "#" in front of the configuration key to apply the setting.
Changed lines 77-79 from:
* The print provider config file located at: [@C:\Program Files\PaperCut NG\providers\print\win\print-provider.conf@] (the print provider service must be restarted)

You
will need to set the correct port by changing the following configuration field: @@ApplicationServerPort@@ in the config file.  It is required to remove the hash "#" in front of the configuration key to apply the setting.
to:
* The print provider config file located at: [@C:\Program Files\PaperCut NG\providers\print\win\print-provider.conf@] (the print provider service must be restarted) You will need to set the correct port by changing the following configuration field: @@"ApplicationServerPort"@@ in the config file.  It is required to remove the hash "#" in front of the configuration key to apply the setting.
September 15, 2016, at 08:31 PM by priyanka - Clarify on the changes that need to be made in the print provider config file.
Added lines 78-79:

You will need to set the correct port by changing the following configuration field: @@ApplicationServerPort@@ in the config file.  It is required to remove the hash "#" in front of the configuration key to apply the setting.
Changed line 73 from:
* [@config.properties@] file located in the client directory ( @@ [app-path]/client@@ )(client connection information).
to:
* [@config.properties@] file located in the client directory (@@ [app-path]/client@@)(client connection information).
Changed line 75 from:
* [@connection.properties@] file located in the release directory (@ @[app-path]/release @@)( (release station connection information)
to:
* [@connection.properties@] file located in the release directory (@@[app-path]/release @@)( (release station connection information)
Changed line 75 from:
* [@connection.properties@] file located in the release directory (@[app-path]/release@)( (release station connection information)
to:
* [@connection.properties@] file located in the release directory (@ @[app-path]/release @@)( (release station connection information)
Changed line 73 from:
* [@config.properties@] file located in the client directory ( @ [app-path]/client @ )(client connection information).
to:
* [@config.properties@] file located in the client directory ( @@ [app-path]/client@@ )(client connection information).
Changed line 73 from:
* [@config.properties@] file located in the client directory (@ [app-path]/client @)(client connection information).
to:
* [@config.properties@] file located in the client directory ( @ [app-path]/client @ )(client connection information).
Changed line 73 from:
* [@config.properties@] file located in the client directory (@[app-path]/client@)(client connection information).
to:
* [@config.properties@] file located in the client directory (@ [app-path]/client @)(client connection information).
Changed lines 73-75 from:
* [@config.properties@] file located in the client directory ([app-path]/client)(client connection information).

* [@connection.properties@] file located in the release directory ([app-path]/release)( (release station connection information)
to:
* [@config.properties@] file located in the client directory (@[app-path]/client@)(client connection information).

* [@connection.properties@] file located in the release directory (@[app-path]/release@)( (release station connection information)
Changed lines 73-75 from:
* [@config.properties@] file located in the client directory (client connection information).

* [@connection.properties@] file located in the release directory (release station connection information)
to:
* [@config.properties@] file located in the client directory ([app-path]/client)(client connection information).

* [@connection.properties@] file located in the release directory ([app-path]/release)( (release station connection information)
August 08, 2013, at 09:53 PM by ian - formatting
Added line 6:
August 08, 2013, at 09:52 PM by ian - add comment about firewalls
Changed lines 8-9 from:

to:
'''Important:''' If PaperCut appears unresponsive on port 80 or 443 after enabling this, test access from the server itself. If you can access the web interface from the server, check that you do not have a firewall restriction in place for inbound connections on port 80 or 443.


Added lines 51-53:
     Note: For those who have upgraded from previous versions of the software to 12.5 or newer, these lines will not
    be present. They can simply be added to the [app path]\server\server.properties file.

Changed lines 43-44 from:
-->[@C:\Program Files\PaperCut NG\server\server.properties@]
to:
--->[@C:\Program Files\PaperCut NG\server\server.properties@]
Changed line 45 from:
->'''4)''' Modify these lines to enable alternate port mappings to be:
to:
->'''4)''' Modify these lines (set to [@Y@]) to enable alternate port mappings to be:
Changed lines 49-50 from:
->'''5)''' Finally Sart the ''PaperCut Application Server'' service again.
to:
->'''5)''' Finally start the ''PaperCut Application Server'' service again.
Changed lines 37-43 from:
Temporarily "Stop" the PaperCut Application Server service, under ''Control Panel -> Administrative Tools -> Services''

Open the file:

->[@C:\Program Files\PaperCut NG\server\server.properties@]

Modify
these lines to enable alternate port mappings to be:
to:
->'''1)''' First ensure no other programs such as IIS are using ports 80 and 443.

->'''2)''' Temporarily "Stop" the PaperCut Application Server service, under ''Control Panel -> Administrative Tools -> Services''

->'''3)''' Open the file:

-->[@C:\Program Files\PaperCut NG\server\server.properties@]

->'''4)'''
Modify these lines to enable alternate port mappings to be:
Changed lines 49-50 from:
Finally Sart the ''PaperCut Application Server'' service again.
to:
->'''5)''' Finally Sart the ''PaperCut Application Server'' service again.
Changed line 5 from:
 The configuration procedure is different for each operating system. See below for instructions.
to:
The configuration procedure is different for each operating system. See below for instructions.
Changed lines 37-38 from:
Disable the PaperCut Application Server service, under ''Control Panel -> Administrative Tools -> Services''
to:
Temporarily "Stop" the PaperCut Application Server service, under ''Control Panel -> Administrative Tools -> Services''
Changed lines 47-48 from:
Finally restart the ''PaperCut Application Server'' service.
to:
Finally Sart the ''PaperCut Application Server'' service again.
Changed lines 3-9 from:
By default PaperCut NG uses ports:

->'''
9191''' for HTTP connections
->'''9192'''
for encrypted HTTPS/SSL connections

PaperCut can be configured to listen to the standard HTTP / HTTPS ports 80 and 443 in addition to the above
.
to:
By default, PaperCut listens to ports 9191 and 9192 for HTTP and HTTPS communication respectively.  These ports have been selected as they're generally unused by other applications.  Because PaperCut is a web application it may be desirable to have the interface available on the standard HTTP and HTTPS ports (80 and 443 respectively).  One reason for doing so may be to simplify URLs communicated verbally (as the user will not have to supply a port number).

 The configuration procedure is different for each operating system. See below for instructions.
'''Important:''' Before you begin, first ensure no other applications (such as IIS, or Apache) are currently installed and using ports 80 or 443 on the server hosting PaperCut.


Changed lines 37-41 from:
PaperCut 12.5 and above on Windows can be configured to listen to ports 80 (HTTP) and 443 (HTTPS) in addition to the default 9191 and 9192 ports.  One reason for doing this may be to simplify URLs communicated verbally (as a user will not have to supply a port number).

Firstly, ensure no other applications (such as IIS) are currently listening to ports 80 or 443.
Next, disable
the PaperCut Application Server service, under ''Control Panel -> Administrative Tools -> Services''
to:
Disable the PaperCut Application Server service, under ''Control Panel -> Administrative Tools -> Services''
Changed lines 8-9 from:

to:
PaperCut can be configured to listen to the standard HTTP / HTTPS ports 80 and 443 in addition to the above.
Changed lines 40-41 from:
to:
Next, disable the PaperCut Application Server service, under ''Control Panel -> Administrative Tools -> Services''
Changed lines 50-51 from:
then restart the ''PaperCut Application Server'' service under ''Control Panel -> Administrative Tools -> Services''
to:
Finally restart the ''PaperCut Application Server'' service.
Changed lines 8-11 from:
'''IMPORTANT:''' We '''highly recommend''' leaving PaperCut on these ports as many areas of the application assume these ports are open.  Changing ports ''will'' cause future problems.  For example, you may upgrade PaperCut and new features or components will default to the standard ports.  Some organizations however have a preference for the standard port 80.  This is an option, however first you '''must ensure''' that no other programs such as IIS or Apache are using the port on the same system.

Where possible we recommend forwarding or port redirection rather than remapping the application's own port (e.g. port 80 maps through to 9191 so it may be accessed ''both'' on port 80 and the standard 9191)

to:

Added lines 52-56:

'''IMPORTANT:''' We '''highly recommend''' leaving PaperCut on these ports as many areas of the application assume these ports are open.  Changing ports ''will'' cause future problems.  For example, you may upgrade PaperCut and new features or components will default to the standard ports.  Some organizations however have a preference for the standard port 80.  This is an option, however first you '''must ensure''' that no other programs such as IIS or Apache are using the port on the same system.

Where possible we recommend forwarding or port redirection rather than remapping the application's own port (e.g. port 80 maps through to 9191 so it may be accessed ''both'' on port 80 and the standard 9191)

Changed lines 48-50 from:
     server.offer-http-on-port-80=Y
    server.offer-https-on-port-443=Y
to:
     server.enable-http-on-port-80=Y
    server.enable-https-on-port-443=Y
Changed lines 39-40 from:
PaperCut 12.5 and above on Windows can be configured to listen to ports 80 (HTTP) and 443 (HTTPS) in addition to the default 9191 and 9192 ports.
to:
PaperCut 12.5 and above on Windows can be configured to listen to ports 80 (HTTP) and 443 (HTTPS) in addition to the default 9191 and 9192 ports.  One reason for doing this may be to simplify URLs communicated verbally (as a user will not have to supply a port number).
Changed lines 39-40 from:
PaperCut 12.5 and above on Windows can be configured to listen to Ports 80 (HTTP) and 443(HTTPS) instead of, or in addition to the default 9191 and 9192.
to:
PaperCut 12.5 and above on Windows can be configured to listen to ports 80 (HTTP) and 443 (HTTPS) in addition to the default 9191 and 9192 ports.
Added lines 41-42:
Firstly, ensure no other applications (such as IIS) are currently listening to ports 80 or 443.
Changed lines 39-40 from:
PaperCut 12.5 and above on Windows can be configured to listen to Ports 80 (HTTP) and 443(HTTPS) instead of the default 9191 and 9192.
to:
PaperCut 12.5 and above on Windows can be configured to listen to Ports 80 (HTTP) and 443(HTTPS) instead of, or in addition to the default 9191 and 9192.
Changed line 37 from:
On Windows port forwarding is not supported by PaperCut unless you are running a third party web server such as Apache that supports HTTP request proxies (see below). For this reason administrators can configure PaperCut to use ports 9191/9192 or 80/443 but not both.
to:
Changed lines 46-48 from:
     server.offer-http-on-port-80=yes
    server.offer-https-on-port-443=no
to:
     server.offer-http-on-port-80=Y
    server.offer-https-on-port-443=Y
Added lines 58-59:
On Windows port forwarding is not supported by PaperCut unless you are running a third party web server such as Apache that supports HTTP request proxies (see below). For this reason administrators can configure PaperCut to use ports 9191/9192 and/or 80/443.
Deleted line 72:
October 09, 2012, at 05:42 AM by Alec - Reviewed and updated
Changed lines 8-9 from:
'''IMPORTANT:''' We '''highly recommend''' leaving PaperCut on these ports as many areas of the application assume these ports are open.  Changing ports ''will'' cause future problems.  For example, you may upgrade PaperCut and the new features/components will default to the standard ports.  Some organizations however have a preference for the standard port 80.  This is an option, however first you '''must ensure''' that no other programs such as IIS or Apache are using the port on the same system.
to:
'''IMPORTANT:''' We '''highly recommend''' leaving PaperCut on these ports as many areas of the application assume these ports are open.  Changing ports ''will'' cause future problems.  For example, you may upgrade PaperCut and new features or components will default to the standard ports.  Some organizations however have a preference for the standard port 80.  This is an option, however first you '''must ensure''' that no other programs such as IIS or Apache are using the port on the same system.
Changed line 15 from:
   /sbin/iptables -t nat -I PREROUTING --src 0/0 --dst <server_ip>
to:
   /sbin/iptables -t nat -I PREROUTING --src 0/0 --dst <server_ip> \\
Changed line 18 from:
   /sbin/iptables -t nat -I PREROUTING --src 0/0 --dst <server_ip>
to:
   /sbin/iptables -t nat -I PREROUTING --src 0/0 --dst <server_ip> \\
Changed lines 21-24 from:
[-(indented text = all on one line)-]

Please these in a rc init script or the iptables startup config script as provided by your distribution.
to:
[-(the two commands above should each be a single line)-]

Place these in a rc init script or the iptables startup config script as provided by your distribution.
Changed lines 34-35 from:
''See [=man ipfw=] for all the scary details!''
to:
''See [=ipfw=] man page for all the scary details!''
Added line 37:
On Windows port forwarding is not supported by PaperCut unless you are running a third party web server such as Apache that supports HTTP request proxies (see below). For this reason administrators can configure PaperCut to use ports 9191/9192 or 80/443 but not both.
Changed lines 39-40 from:
PaperCut 12.5 and onwards on Windows can be configured to listen to Ports 80 (HTTP) and 443(HTTPS) instead of the default 9191 and 9192.
to:
PaperCut 12.5 and above on Windows can be configured to listen to Ports 80 (HTTP) and 443(HTTPS) instead of the default 9191 and 9192.
Changed lines 45-48 from:
Modify these lines to enable alternate port mappings:
 
  server.offer-http-on-port-80
    server.offer-https-on-port-443
to:
Modify these lines to enable alternate port mappings to be:
    server.offer-http-on-port-80=yes
    server.offer-https-on-port-443=no
Changed line 51 from:
!!! PaperCut version 12.4 and earlier:
to:
!!! PaperCut version 12.4 and below:
Changed lines 58-59 from:
'''IMPORTANT: ''' Also ensure the port numbers are updated in the following other areas:
to:
'''IMPORTANT: ''' On '''all''' PaperCut versions. Ensure the port numbers are also updated in the following other areas:
Changed lines 68-73 from:
!!! Already running IIS or Apache?
If you are running IIS or
Apache, you can set up a forward or redirect in IIS/Apache. Forward say /user through to :9191/user, etc.

!!Other methods:
The ''guru'' system administrators
could also consider using HTTP request proxies to forward requests from port 80 through to port 9191.  For example, Apache [[http://httpd.apache.org/docs/2.0/mod/mod_proxy.html|mod_proxy]] could be used to accomplish this.
to:
!!Other methods (all platforms):
If you are running IIS or
Apache, you can set up a forward or redirect in the webs server. Forward say /user through to :9191/user, etc. For example, Apache [[http://httpd.apache.org/docs/2.0/mod/mod_proxy.html|mod_proxy]] could be used to accomplish this.

Changed lines 28-29 from:
''Advanced Admins Only''
to:
!!!Advanced Admins Only
Added line 67:
!!! Already running IIS or Apache?
Added line 37:
!!! PaperCut version 12.5 and later:
Changed lines 50-51 from:

to:
!!! PaperCut version 12.4 and earlier:
Prior to 12.5, you will need to change the ports defined in the file:

->[@C:\Program Files\PaperCut NG\server\server.properties@]

then restart the ''PaperCut Application Server" service under ''Control Panel -> Administrative Tools -> Services''

'''IMPORTANT: ''' Also ensure the port numbers are updated in the following other areas:

* [@config.properties@] file located in the client directory (client connection information).

* [@connection.properties@] file located in the release directory (release station connection information)

* The print provider config file located at: [@C:\Program Files\PaperCut NG\providers\print\win\print-provider.conf@] (the print provider service must be restarted)

* The print provider config file located on any secondary server or future installed secondary server.

If you are running IIS or Apache, you can set up a forward or redirect in IIS/Apache. Forward say /user through to :9191/user, etc.

Changed lines 37-40 from:
Set up a forward or redirect in IIS.  Forward say @@/user@@ through to @@:9191/user@@, etc.

Alternatively, change the ports defined in
the file:
to:
PaperCut 12.5 and onwards on Windows can be configured to listen to Ports 80 (HTTP) and 443(HTTPS) instead of the default 9191 and 9192.

Open
the file:
Changed lines 43-54 from:
then restart the ''PaperCut Application Server" service under ''Control Panel -> Administrative Tools -> Services''

'''IMPORTANT: ''' Also ensure the
port numbers are updated in the following other areas:

* [@config.properties@] file located in the client directory (client connection information).

* [@connection.properties@] file located in the release directory (release station connection information)

* The print provider config file located at: [@C:\Program Files\PaperCut NG\providers\print\win\print-provider.conf@] (the print provider service must be restarted)

* The print provider config file located on any secondary server or future installed secondary server.

to:
Modify these lines to enable alternate port mappings:
     server.offer-http-on-port-80
 
    server.offer-https-on-port-443

then restart the ''PaperCut Application Server'' service under ''Control Panel -> Administrative Tools -> Services''


Changed lines 25-26 from:
Remapping port 80 to 9191 is recommend over changing the port in [@server.properties@] as port 80 directly requires processes to run with elevated root privileges.  Forwarding provides an elegant solution without the need to change any PaperCut config or rights.
to:
Remapping port 80 to 9191 is recommend over changing the port in [@server.properties@] as port 80 directly requires processes to run with elevated root privileges.  Forwarding provides an elegant solution without the need to change any PaperCut config or run PaperCut under elevated rights.
Changed lines 39-40 from:
Change the ports defined in the file:
to:
Alternatively, change the ports defined in the file:
Added lines 37-38:
Set up a forward or redirect in IIS.  Forward say @@/user@@ through to @@:9191/user@@, etc.
Added lines 10-11:
Where possible we recommend forwarding or port redirection rather than remapping the application's own port (e.g. port 80 maps through to 9191 so it may be accessed ''both'' on port 80 and the standard 9191)
Changed line 55 from:
''Categories:'' [[!Implementation]], [[!WebTools]]
to:
''Categories:'' [[Category.Implementation|+]], [[Category.UserWebInterface|+]]
Changed lines 57-59 from:

[-keywords: other port, standard ports, change ports -]
to:
[-Keywords: other port, standard ports, change ports -]
Changed lines 8-9 from:
'''IMPORTANT:''' We '''highly recommend''' leaving PaperCut on these ports as many areas of the application assume these ports are open.  Some organizations however have a preference for the standard port 80.  This is an option, however first you '''must ensure''' that no other programs such as IIS or Apache are using the port on the same system.
to:
'''IMPORTANT:''' We '''highly recommend''' leaving PaperCut on these ports as many areas of the application assume these ports are open.  Changing ports ''will'' cause future problems.  For example, you may upgrade PaperCut and the new features/components will default to the standard ports.  Some organizations however have a preference for the standard port 80.  This is an option, however first you '''must ensure''' that no other programs such as IIS or Apache are using the port on the same system.
Changed lines 52-53 from:
The ''guru'' system administrators could also consider using HTTP request proxies to forward requests from port 80 through to port 9191.  For example, Apache ''mod_proxy'' could be used to accomplish this.
to:
The ''guru'' system administrators could also consider using HTTP request proxies to forward requests from port 80 through to port 9191.  For example, Apache [[http://httpd.apache.org/docs/2.0/mod/mod_proxy.html|mod_proxy]] could be used to accomplish this.
Added lines 51-53:
!!Other methods:
The ''guru'' system administrators could also consider using HTTP request proxies to forward requests from port 80 through to port 9191.  For example, Apache ''mod_proxy'' could be used to accomplish this.

Changed lines 55-56 from:
[-keywords: other port, standard ports -]
to:
[-keywords: other port, standard ports, change ports -]
Changed lines 8-9 from:
We '''highly recommend''' leaving PaperCut on these ports as many areas of the application assume these ports are open.  Some organizations however have a preference for the standard port 80.  This is an option, however first you '''must ensure''' that no other programs such as IIS or Apache are using the port on the same system.
to:
'''IMPORTANT:''' We '''highly recommend''' leaving PaperCut on these ports as many areas of the application assume these ports are open.  Some organizations however have a preference for the standard port 80.  This is an option, however first you '''must ensure''' that no other programs such as IIS or Apache are using the port on the same system.
Changed lines 1-2 from:
(:title Running PaperCut NG on port 80:)
to:
(:title Running PaperCut NG on port 80 (or another port):)

Comments

Share your findings and experience with other PaperCut users. Feel free to add comments and suggestions about this Knowledge Base article. Please don't use this for support requests.

Article last modified on September 15, 2017, at 02:39 AM
Printable View   |   Article History   |   Edit Article