Enhancement #2758

Preserve IP host name in HTTP requests

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

Status:CLOSEDStart date:
Priority:NormalDue date:
Assignee:-% Done:

100%

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

Description

This is a configuration change proposal for httpd configuration.

Using IP address in HTTP requests now produce a redirect to the first (default) vhost name. This is a problem if this name is not resolved by DNS (i.e. outside LAN).

The UseCanonicalName directive is now set to On in httpd.conf, that means a request to <IPaddress>/something is redirected to <firstvhost>/something/.

If set to Off the IP address is preserved, as any other DNS name pointing to the web server. The request is served by the first (default) vhost configured.


Related issues

Related to NethServer 6 - Bug #2371: SOGo redirect to internal DNS name CLOSED 11/27/2013 11/27/2013
Related to NethServer 6 - Enhancement #2759: Preserve request host name in SOGo CLOSED

Associated revisions

Revision c2515d5a
Added by Davide Principi about 7 years ago

httpd.conf: Preserve IP host name in HTTP requests. Refs #2758

Set UseCanonicalName directive "Off". This is the CentOS default.

History

#1 Updated by Davide Principi about 7 years ago

  • Related to Bug #2371: SOGo redirect to internal DNS name added

#2 Updated by Davide Principi about 7 years ago

The default from CentOS package is Off!

#3 Updated by Davide Principi about 7 years ago

#4 Updated by Davide Principi about 7 years ago

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

#5 Updated by Davide Principi about 7 years ago

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

Test case

After upgrading:

  • Create a shared folder: iba1
  • Check redirect occurs on the requested host (In the following example: machine hostname davidep2.vboxnet0.tld with smtp.vboxnet0.tld as self alias, IP address 192.168.8.2):
        # curl  -s -vL http://smtp.vboxnet0.tld/iba1
    [...]
    < HTTP/1.1 301 Moved Permanently
    < Location: http://smtp.vboxnet0.tld/iba1/
    [...]
    < HTTP/1.1 200 OK
    
        # curl  -s -vL http://192.168.8.2/iba1
    [...]
    < HTTP/1.1 301 Moved Permanently
    < Location: http://192.168.8.2/iba1/
    [...]
    < HTTP/1.1 200 OK
    
    

#6 Updated by Davide Principi about 7 years ago

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

In nethserver-testing:
nethserver-httpd-2.3.0-2.0gitc2515d5a.ns6.noarch.rpm

#7 Updated by Massimo Palazzetti about 7 years ago

  • Assignee set to Massimo Palazzetti

#8 Updated by Massimo Palazzetti about 7 years ago

  • Status changed from ON_QA to VERIFIED
  • Assignee deleted (Massimo Palazzetti)
  • % Done changed from 70 to 90

Tested: ok

#9 Updated by Giacomo Sanchietti about 7 years ago

  • Status changed from VERIFIED to CLOSED
  • % Done changed from 90 to 100
Release in nethserver-updates:
  • nethserver-httpd-2.3.1-1.ns6.noarch.rpm

Also available in: Atom PDF