Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 12th April 2012, 15:54
Mikeh1 Mikeh1 is offline
Junior Member
 
Join Date: Apr 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error 400 Bad Request not working

Hello!

My current ISPConfig3 installation is currently accessible under an https://..:8080 connection. I have a working SSL certificate and the site is working properly. However, when I browse to http://..:8080 I don't get a site.. Just half of the source code like this:

Code:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
Reason: You're speaking plain HTTP to an SSL-enabled server port.<br />
Instead use the HTTPS scheme to access this URL, please.<br />
<blockquote>Hint: <a href="https://..:8080/"><b>https://..:8080/</b></a></blockquote></p>
</body></html>
This is under Firefox. When I try it with Internet Explorer I just get an empty page. How could I fix this problem so the browser processes the HTML code properly? And is it possible to rewrite the http to https with apache mod_rewrite?

I've tried entering;

Code:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
In a .htaccess file but that didn't work

I've no idea where I should enter that bit of code. I've also tried the ispconfig.vhost file but that didn't work either.
Reply With Quote
Sponsored Links
  #2  
Old 12th April 2012, 16:23
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,573
Thanks: 792
Thanked 4,980 Times in 3,901 Posts
Default

You have a https enabled vhost on port 8080 and such a vhost can only speak https and not http. You can not rewrite that as there is no http vhost where for non https could arrive as one port can only answer to one protocol at a time in apache (and most likely any other webserver), so thats not a issue in ispconfig nor a wrong configuration that you get a error message. To understand that better please remmeber that http and https is normally under two ports (80 and 443) and the browser tries a default fallback in such a case which you could detect with mod_rewrite. There is no such option if you use different ports then 80 and 443.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 12th April 2012, 16:34
Mikeh1 Mikeh1 is offline
Junior Member
 
Join Date: Apr 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by till View Post
You have a https enabled vhost on port 8080 and such a vhost can only speak https and not http. You can not rewrite that as there is no http vhost where for non https could arrive as one port can only answer to one protocol at a time in apache (and most likely any other webserver), so thats not a issue in ispconfig nor a wrong configuration that you get a error message. To understand that better please remmeber that http and https is normally under two ports (80 and 443) and the browser tries a default fallback in such a case which you could detect with mod_rewrite. There is no such option if you use different ports then 80 and 443.
Ah that does make sense yea..

How about the other problem with the error page 400 not displaying correctly? It's showing HTML tags in Firefox while Internet Explorer just gives a blank page when browsing to http:// instead of https://.
Is that the same problem with the ports?

Thanks
Reply With Quote
  #4  
Old 12th April 2012, 17:12
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,573
Thanks: 792
Thanked 4,980 Times in 3,901 Posts
Default

I've no idea why firefox displays it as sourcecode, chrome renders it correctly and ie does not seem to be able to display it at all. Maybe someone else has a good idea on that
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 11th January 2014, 08:41
ikt ikt is offline
Junior Member
 
Join Date: Feb 2012
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
 
Default

sorry to bump an old thread but does anyone have any ideas about getting the 400 bad request to not show just the source code and where is the file to edit it?
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't receive mails baicunko Server Operation 12 3rd August 2011 22:02
Intel 82815 Video Card & Ubuntu 8.10 harvey527 Kernel Questions 8 5th November 2010 14:51
Can't access to my website - after install problem pallermo Installation/Configuration 18 4th June 2010 13:29
proFTPd passive mode problems bisbell Server Operation 8 6th August 2008 21:12
Logsize issue cryptic General 46 7th April 2008 22:29


All times are GMT +2. The time now is 19:43.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.