View Single Post
  #1  
Old 31st January 2012, 00:00
platan platan is offline
Junior Member
 
Join Date: Oct 2008
Posts: 9
Thanks: 0
Thanked 4 Times in 2 Posts
Send a message via Skype™ to platan
Default Quiet redirection from http to https on port 8080

Ispconfig3
Apache
SSL on port 8080
Problem: Error 400: Bad Request - ... Hint: http://...:8080
when http access. Terrible!

A small trick will solve the problem.

In a file: /etc/httpd/conf/sites-available/ispconfig.vhost add error document line before </VirtualHost>:
Code:
  ...
  SSLCertificateKeyFile /usr/local/ispconfig/interface/ssl/ispserver.key
  ErrorDocument 400 "<script>document.location.href='https://example.com:8080/';</script><a href='https://example.com:8080/'>https://example.com:8080/</a>"
  
</VirtualHost>
Attention:
  1. Hostname (example.com) must be hardcoded. %{HOST_NAME} or something does not work.
  2. You must reenter ErrorDocument every time, You update Ispconfig3 system.

Enjoy

Last edited by platan; 31st January 2012 at 00:10.
Reply With Quote
Sponsored Links