Enhancement #2330

server-manager redirect on port 980

Added by Davide Principi over 7 years ago. Updated over 7 years ago.

Status:CLOSEDStart date:11/11/2013
Priority:NormalDue date:11/11/2013
Assignee:-% Done:

100%

Category:nethserver-httpd-admin
Target version:v6.5-beta3
Resolution: NEEDINFO:No

Description

A permanent redirect from /server-manager to SystemName.DomainName, port 980 is defined in /etc/e-smith/templates/httpd/vhost-default/10server-manager.

The redirection must change only the URL port number, leaving the host part intact. For instance:

http://server.domain/server-manager => https://server.domain:980
http://14.15.16.17/server-manager => https://14.15.16.17:980

This enhancement possibly simplifies the remote assistance, for instance when the server is accessible through port-forwarding and public IP address.


Related issues

Related to NethServer 6 - Enhancement #2167: Remove external JS libraries from source repositories CLOSED 11/11/2013 11/12/2013

Associated revisions

Revision 73f8558b
Added by Davide Principi over 7 years ago

Redirect to httpd-admin instance via HTTP Host header. Refs #2330

The client is redirected to the same host. Only port is changed and
schema is forced to "https".

History

#1 Updated by Davide Principi over 7 years ago

  • Due date set to 11/11/2013
  • Status changed from NEW to TRIAGED
  • Start date set to 11/11/2013
  • % Done changed from 0 to 20

#2 Updated by Davide Principi over 7 years ago

  • Status changed from TRIAGED to ON_DEV
  • Assignee set to Davide Principi
  • % Done changed from 20 to 30

#3 Updated by Davide Principi over 7 years ago

  • Status changed from ON_DEV to MODIFIED
  • Assignee deleted (Davide Principi)
  • % Done changed from 30 to 60

Test case

The HTTP Location header must direct to the same host specified by Host header. Port must be changed to 980, schema must be https

For instance, before update (some lines of output are not reported):

    # curl -k -v -L http://127.0.0.1:80/server-manager/xxx
* About to connect() to 127.0.0.1 port 80 (#0)
*   Trying 127.0.0.1... connected
* Connected to 127.0.0.1 (127.0.0.1) port 80 (#0)
> GET /server-manager/xxx HTTP/1.1
> Host: 127.0.0.1
> 
< HTTP/1.1 301 Moved Permanently
< Location: https://davidep3.vboxnet0.tld:980/xxx

After update:

    # curl -k -v -L http://127.0.0.1:80/server-manager/xxx
* About to connect() to 127.0.0.1 port 80 (#0)
*   Trying 127.0.0.1... connected
* Connected to 127.0.0.1 (127.0.0.1) port 80 (#0)
> GET /server-manager/xxx HTTP/1.1
> Host: 127.0.0.1
> 
< HTTP/1.1 301 Moved Permanently
< Location: https://127.0.0.1:980/xxx

#4 Updated by Davide Principi over 7 years ago

  • Status changed from MODIFIED to ON_QA
  • % Done changed from 60 to 70

In nethserver-testing:
nethserver-httpd-admin-1.0.6-8.0git73f8558b.ns6.noarch.rpm

#5 Updated by Giacomo Sanchietti over 7 years ago

  • Assignee set to Giacomo Sanchietti

#6 Updated by Giacomo Sanchietti over 7 years ago

  • Status changed from ON_QA to VERIFIED
  • Assignee deleted (Giacomo Sanchietti)
  • % Done changed from 70 to 90

Marking as VERIFIED.

After update of nethserver-httpd-admin, Nethgui framework raises an error:

Dec  6 16:33:16 test httpd-admin: PHP Warning:  Cannot modify header information - headers already sent by (output started at /usr/share/nethesis/Nethgui/Framework.php:506) in /usr/share/nethesis/nethserver-manager/index.php on line 38

To fix previous error update nethserver-netugui to release nethserver-nethgui-1.2.4-13.0gitb814d52a.ns6

Installed packages:

[root@test ~]# rpm -qa | grep nethserver-httpd
nethserver-httpd-admin-1.0.6-12.0git547b73e8.ns6.noarch
nethserver-httpd-2.2.1-1.ns6.noarch

Redirect works as expected.

#7 Updated by Davide Principi over 7 years ago

  • Status changed from VERIFIED to CLOSED
  • % Done changed from 90 to 100

In nethserver-updates:
nethserver-samba-1.4.0-1.ns6.noarch.rpm
nethserver-directory-1.3.0-1.ns6.noarch.rpm
nethserver-dnsmasq-1.1.0-1.ns6.noarch.rpm
nethserver-shorewall-1.0.3-1.ns6.noarch.rpm
nethserver-mail-server-1.5.0-1.ns6.noarch.rpm
nethserver-mail-filter-1.1.4-1.ns6.noarch.rpm
nethserver-nethgui-1.3.0-1.ns6.noarch.rpm
nethserver-base-1.5.0-1.ns6.noarch.rpm
nethserver-lib-1.4.0-1.ns6.noarch.rpm
nethserver-httpd-admin-1.1.0-1.ns6.noarch.rpm
nethserver-yum-1.2.0-1.ns6.noarch.rpm
nethserver-ntopng-1.1.0-1.ns6.noarch.rpm

Also available in: Atom PDF