• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

apache appending port number to url on ssl request

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to access a url like https://abcd/test and it is getting redirected with port number https://abcd:9011/test/. Since it is routing through load balancer, it is not required to use the actual webserver port number and other pages are loading without port number(using default port). But if access it using http:// it works fine. Please help if I am missing anything in ssl.conf
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you submit a URL for "https://", if you don't include an explicit port number, the standard is that the URL will be routed to port 443. It's hard-coded into client applications and DNS cannot help (DNS only resolves IP addresses, not port numbers).

So if something needs to go to port 9011, then the URL must include ":9011" in the URL. Otherwise, a URL beginning with "https://" will behave exactly like "https://abcd:443" and a URL beginning with "http://" will behave exactly like "http://abcd:80".

You can put a front-end proxy (such as Apache mod_proxy or iptables) to do port translation and thereby use a simplified URL, but you cannot omit the port from the final destination.
 
Die Fledermaus does not fear such a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic