Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 4th August 2008, 06:13
Code5 Code5 is offline
Member
 
Join Date: Jun 2008
Posts: 45
Thanks: 0
Thanked 1 Time in 1 Post
Question 400 Bad Request ---- Displays wrong info

Hi all,

Quick question; when i goto mydomain.com:81 I recieve a 400 Bad Request

It displays the following:
---------------------------------------------

Bad Request
Your browser sent a request that this server could not understand.

Reason: You're speaking plain HTTP to an SSL-enabled server port.
Instead use the HTTPS scheme to access this URL, please.

Hint: https://www.linux5.config:81/
---------------------------------------------

How do i fix the problem with the wrong hint? It should say;

Hint: Https://www.mydomain.com:81


Thanks.
Reply With Quote
Sponsored Links
  #2  
Old 4th August 2008, 10:08
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,046
Thanks: 826
Thanked 5,384 Times in 4,231 Posts
Default

Have a look in the file /root/ispconfig/httpd/conf/httpd.conf and change the hostname there.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
bowlAltetle (21st July 2014)
  #3  
Old 5th August 2008, 01:12
Code5 Code5 is offline
Member
 
Join Date: Jun 2008
Posts: 45
Thanks: 0
Thanked 1 Time in 1 Post
Question

Ive checked the .conf file and cannot find the hostname variable.

The only variable in there that looks like it resembles hostname is:

#ServerName www.linux5.config

As this is commented out it must not be required and that the variable i must change to fix this problem must be in another file elsewhere.

Correct me if im wrong.


Cheers.
Reply With Quote
  #4  
Old 5th August 2008, 10:26
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,046
Thanks: 826
Thanked 5,384 Times in 4,231 Posts
Default

What is the output of:

hostname

and:

hostname -f

and:

grep www.linux5.config /root/ispconfig/httpd/conf/httpd.conf
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
Williamsl (10th July 2014)
  #5  
Old 6th August 2008, 05:32
Code5 Code5 is offline
Member
 
Join Date: Jun 2008
Posts: 45
Thanks: 0
Thanked 1 Time in 1 Post
Question

The output is as follows:

-----------------------------------------------------------
root@linux5:~# hostname
linux5.config
root@linux5:~# hostname -f
linux5.config
root@linux5:~# grep www.linux5.config /root/ispconfig/httpd/conf/httpd.conf
ServerAdmin root@www.linux5.config
#ServerName www.linux5.config
ServerName www.linux5.config
ServerAdmin root@www.linux5.config
root@linux5:~#
-----------------------------------------------------------

As we can see the hostname needs changing, but why? as other webservers can produce the "Hint Info" from the domain its being called from and shouldnt require manual hostname editing to show that www.mydomain.com requires ssl using https://www.mydomain.com

Thanks.
Reply With Quote
The Following User Says Thank You to Code5 For This Useful Post:
Williamsl (10th July 2014)
  #6  
Old 6th August 2008, 12:37
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,046
Thanks: 826
Thanked 5,384 Times in 4,231 Posts
Default

The server on port 81 is no vhost, so it uses the hostname info from its config file. Please change all occurrences of www.linux5.config to the new hostname in /root/ispconfig/httpd/conf/httpd.conf and restart the ispconfig_server. Then you should change the hostname of the server too, as www.linux5.config is no valid hostname and might cause trouble e.g. when sending mail.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 13th November 2013, 04:43
ghostshell ghostshell is offline
Junior Member
 
Join Date: Apr 2012
Posts: 6
Thanks: 0
Thanked 2 Times in 2 Posts
 
Default

Quote:
Originally Posted by till View Post
The server on port 81 is no vhost, so it uses the hostname info from its config file. Please change all occurrences of www.linux5.config to the new hostname in /root/ispconfig/httpd/conf/httpd.conf and restart the ispconfig_server. Then you should change the hostname of the server too, as www.linux5.config is no valid hostname and might cause trouble e.g. when sending mail.
Whats distro are you running? On CentOS i do not have:

/root/ispconfig/httpd/conf/httpd.conf

Any ideas? I am running into the same issue when using both NICs, using only one NIC, if i switch the IP to a different address the 400 error instead of showing the host name www.mydomain.com reverts to localhost.localdomain. If i switch back to the IP that i was originally using it goes back to www.mydomain.com. Any idea why this happens? Where does the localhost.localdomain get pulled from? The only place i can find it is in my hosts file.

This may help with a solution to my issue, when i ping the host name it, www.mydomain.com, it comes back with;

localhost.localdomain 127.0.0.1

and not the hostname itself with the IP, im guessing i did not change it in ISPConfig someplace unless the issue is what is in my hosts file.

Last edited by ghostshell; 13th November 2013 at 05:12.
Reply With Quote
The Following User Says Thank You to ghostshell For This Useful Post:
bowlAltetle (24th July 2014)
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
proFTPd passive mode problems bisbell Server Operation 8 6th August 2008 21:12
/etc/passwd wiped out after updating user via CP DantePasquale Installation/Configuration 4 25th April 2008 20:29
Incoming Mail Deleted? Jammer4774 General 19 20th July 2007 22:06
High Availability Samba cluster - DRBD + Heartbeat djalex Server Operation 58 25th May 2007 19:38
Apache2 don't start /var/www/sharedip don't exist Dr.Oetker General 14 6th May 2007 13:15


All times are GMT +2. The time now is 18:28.


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