400 Bad Request - The Perfekt Server - ISPConfig3 - Ubuntu10.04

Discussion in 'HOWTO-Related Questions' started by danhansen@denmark, Mar 17, 2013.

  1. danhansen@denmark

    danhansen@denmark HowtoForge Supporter

    Hi everyone,

    After following tutorial The Perfect Server - ISPConfig3 - Ubuntu10.04 I tried to test the ControlPanel by typing http://myipaddress:8080 as suggested.This command from the tutorial was entered: http://192.168.0.100:8080/ (with my own IP of course)
    This is what appears on the screen:

    <!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://webserver1.mydomain.tld:8080/"><b>https://mydomain.tld.dk:8080/</b></a></blockquote></p>
    </body></html>

    Accessing PhpMyAdmin went a lot better! This works just fine.

    In the end of the installation of ISPConfig3 there was a question regarding SSL and secure something.. There was no example of what to answer in the tutorial so I just choosed the default answer. Is this where I got it wrong?

    Please help me - looking forward to your response

    Kind Regards
    DanHansen@Denmark
     
    Last edited: Mar 17, 2013
  2. falko

    falko Super Moderator

    Please use HTTPS.
     
  3. danhansen@denmark

    danhansen@denmark HowtoForge Supporter

    http or https - the usual way? + "This Connection is Untrusted"

    Hi Falko,

    Thanks a lot for your response :)

    Will you please specify why this is? I really want to understand this. Below I have inserted some of the warnings that was shown when I entered the site using "https". The reason I an sking is because the example in the tutorial was "http". I get that this is a secure connection, but did I choose anything "wrong" during the setup? Or is it because there are more than one way to do it? As mentioned earlier on, there was a few question regarding, not the private key 'smtpd.key, but another key where the same info has to be filled in. I do not remember the name of that key. rsa something??? I am not sure. But it was right after filling in info for the private key 'smtpd.key.

    This Connection is Untrusted
    You have asked Firefox to connect
    securely to 192.168.1.200:8080, but we can't confirm that your connection is secure.


    and after accepting this all kind of warnings regarding missing certificate, Using the "view certificate" option, I saw information entered by myself and therefore this is ok I guess... But did I choose something wrong in the setup? Is "https" to usual way to enter the ISPConfig3 controlpanel i wonder???

    Again, thank you for helping - This is a great forum and I am looking forward using your services and software ;)

    Kind Regards,
    DanHansen@Denmark
     
  4. darinpeterson

    darinpeterson HowtoForge Supporter

    Hi Dan,

    You haven't done anything wrong. The certificates created by ISPConfig are not signed by a certified Certificate Authority (CA). There are certain organizations who are approved to sign certificates, approved by the man... If you don't have a CA signed certificate, getting the warning is normal.

    Check out the tutorial here to get an authorized CA certificate: http://www.howtoforge.com/securing-...h-a-free-class1-ssl-certificate-from-startssl.

    Good luck!
    Darin
     
  5. danhansen@denmark

    danhansen@denmark HowtoForge Supporter

    It works! This is the default web page for this server. NOT on the outside!?!

    Hi Darin,

    Thanks for your response. Now I get it! As a matter of fact I once had a certificate from Verisign (I think that was their name) to a little thing I made for windows back in the days ;)
    And, thanks for the link, I will read it carefully and do just that!

    But, being nice and clever at the same time costs :D So will you please look at this too?

    The webserver runs in the local network. Doing this: 192.168.1.200 results in this:
    It works!
    This is the default web page for this server.
    The web server software is running but no content has been added, yet.


    Doing this: 192.168.1.200/webmail results in this:
    SquirrelMail version 1.4.22
    By the SquirrelMail Project Team
    SquirrelMail Login
    Name:
    Password:


    So, it runs locally - but I just can't get it to work from the outside. I've posted another thread in here regarding this, but maybe it is badly written since I've heard nothing yet. I think that is the case. :confused:
    Domain works on outside nameserver, nameserver has A-record --> mystaticip --> router/firewall --> portforwarding 21, 22, 25, 53, 80, 110 and 8080(ispconfig) --> myserverip. I can reach ISPConfig from the outside doing a https on port 8080 but I can't reach the websites, not even the default website that works locally as shown above!?! I tried every combination to reach the websites: mystaticip, mystaticip:80, mydomain mydomain:80 I just keep getting the router/admin part! Can't reach the SqirrelMail webmail from the outside either, tried mystaticip/webmail, mystaticip:8081(from sqirrelmail/faq) mystaticip:8081/webmail etc. etc. All with both http/https! To me, being the novice that I am, it looks like the "catching-the-domain-client/user-and-direct-to-website" directory/docs doesn't work. In the old days I had a company hosting websites etc. But back the we had a ip-number for each website, and therefor it was pretty easy to setup. Just point it in the right direction in the nameserver A-record. Now I can't figure out how it works, and therefore my troubleshooting sucks! My other rather bad thread is this:
    http://www.howtoforge.com/forums/showthread.php?t=61081

    In this thread I found 1 error which has been fix'ed but it didn't change anything:
    http://www.howtoforge.com/forums/showthread.php?p=294523#post294523

    I just don't understand how it works. The missing link I call it: "Joe types www.mydomain.tld" --> nameserver --> mystaticip --> router/firewall --> portforwards 80 --> myserverip [missing link] --> mydomain/client /var/www/clients/client3/web1/web/
    Symlinks? Virtual-stuff?

    I totally get it if nobody can fix this - I tried for days now :confused:
    But I am looking so much forward to any kind of response after 2 hours and 21 minutes of trying to explain somthing I don't get!

    Kind Regards,
    DanHansen@Denmark
     
  6. darinpeterson

    darinpeterson HowtoForge Supporter

    Hi Dan,

    I'm gonna make this quick, b/c I don't believe I'm going to try to answer your original question, b/c I don't understand IP and port forwarding at this time, so I'm not going to go down that road.

    I have an old AMD server that I installed ISPConfig 3 on, and I left it DHCP. If you want to be seen by the outside world, I suggest you do the same. I don't run the server behind any firewall at all. I'm not recommending this to anyone, I am just telling you this, b/c I know it works and I don't want to deal with router problems. What I recommend is that you use DHCP, since you have a single server setup and everything is installed on that one server.

    There is a company http://www.dnsexit.com/, that provides a DynamicDNS client, and I use this on one of my own home servers. Their service is free, and I give them kudos for that. They are a nice company. Here is a link to tell you about their DynamicDNS service: http://www.dnsexit.com/Direct.sv?cmd=3

    If you want to reinstall everything, you can do an "ifconfig" after the initial install to find the IP provided by your ISP. This is the IP to use with dnsexit.com for the initial IP. Install the client, and when your IP changes, dnsexit.com will be updated with your new IP.

    If you don't want to reinstall everything, change your /etc/network/interfaces and /etc/hosts back to DHCP.

    Keep in mind that for every secure site you want to run on your server, you will need a unique IP to run it on. This can be an issue if you only have one IP and don't fully understand IP forwarding.

    I hope this helps... Please let me know, if I can help further...

    Regards,
    Darin
     
  7. danhansen@denmark

    danhansen@denmark HowtoForge Supporter

    Reainstalling the server.

    Hi,

    Thanks for all the answers. I decided to reinstall the server using all the great help/ideas I received in here. I also downloades Falkos manual, 1 day before the new one came, but anyway, I now am looking forward to the result. My new domain is ip and running, my nameserver has been approved by the danish top domain provider. I am having a little problem "redirecting" (change primary nameserver) for the domain used as nameserver because it is hosting itself. The danish top domain provider won't allow me to "redirect" (chance nameserver) because the nameserver does not exist. But, the nameservers is approved by themself and can be seen as approved on their own website. I guess this is because of the egg<>hen problem. I did inform them and I did set it up the correct way with a glue-record. I guess this is why the nameserver got approved of. Well, I will just have to wait and call them again requesting some support regarding this matter.

    I am not sure, but is it possible to get some support directly by somebody in here? I believe to have seen something about that. It will godt, I know, but I really have to be up and running soon. I have an approved nameserver and all that.
    Now I reinstall the server using the manual, and them we will see.

    Any kind of input would be great.

    Kind Regards
    Dan
     
  8. danhansen@denmark

    danhansen@denmark HowtoForge Supporter

    Hi Darin

    Forgot to tell you this:

    New fast internet line only for this project
    Static IP
    All ports opened in router --> server ip number
    Primary nameserver --> ns1.mydomain.tld (approved by danish top level domain provider, is this the right english word?)
    Secondary nameserver --> ns2.somedanishdomainservice.tld

    Ubuntu Server 10.04
    ISPconfig3 - Single server setup (own primary nameserver, as mentioned above)
    Tutorial: The Perfect Server - ISPConfig3 - Ubuntu Server 10.04
    And: Downloaded manual for ISPConfig3 by Falko Timme

    I have been thinking about some of the advices I have been given in here. I've been told that "dovecot" was to prefer from "courier" and to use MyDNS instead of BIND. But I can't find a tutorial with these and ubuntu 10.04 together. I have seached ISPConfig/documentation and on howtoforge too. I found one but this would mean I had to switch to ubuntu 12.04 or 12.10. I am not qualified to modify these torials myself. Therefore I am sticking to this tutorial and following it to the letter. To have a chance of making it work. This is the third time I am reinstall the server and I need it to work on tuesday. I need a webserver up and running with php and perl. And my nameserver, now an public nameserver, need to answer on tuesday too.
    I am not sure, but I think I read somewhere, that it is possible to get some help online, directly from some off the express? Just can't remember who and where I saw it.

    The reinstallation will be done this evening. I've been working through the night but I still have some reading to do before I press on with the ISPConfig3 installation.

    So, if anyone knows who and where to go for some direct/online "ISPConfig3" help on this installation. Please don't hesitate to call out.

    Sorry if there is some "funny" words here and there, I am writing from my smartphone with danish spellchecking :)

    Looking so much forward to hear from you.


    Kind Regards,
    Dan Hansen
     
    Last edited: Apr 1, 2013
  9. darinpeterson

    darinpeterson HowtoForge Supporter

    Hi Dan,

    Please correct me if I'm wrong, but it sounds like you want to use this single server to host websites AND resolve domains. The problem that your service provider has is that they wan the name server separate from your hosting domain. The only way I know how to do this is to have two servers. One could be virtual, but you're going to need another IP. That means you would have to install something like OpenVZ on your system. If I am wrong, please provide more information.

    As far as mail services, I don't know enough about them to recommend one over the other. I run Courier. I'm sure there are plenty of smart people reading this post who would be better qualified to reply to this question.

    Regards,
    Darin
     
    Last edited: Apr 1, 2013
  10. danhansen@denmark

    danhansen@denmark HowtoForge Supporter

    Reainstalling the server and reading 373pages manual. ( no nead to read this now :)

    Hi Darin,

    Of course! Don't panic, I won't be finished reading the manual and reinstalling the server before late. I am just happy that you will take the time to help :) Let's "talk" later :eek:

    Kind Regards,
    Dan
     
  11. danhansen@denmark

    danhansen@denmark HowtoForge Supporter

    Hi Darin,

    It shouldn't be a problem because I'm only running primary nameserver like in this tutorial: http://www.howtoforge.com/ispconfig_dns_providerdomain_schlund - and like in this tutorial I'm using a domain hosting service as secondary nameserver. Actually my nameservers were the only thing working proberly. Testing on the IP that is. The nameserver answers just fine. Its the other things: mails incomming (pop3/IMAP) and websites that teased me.
    Now I am almost through with the reinstallation using the domain registrated for use as nameserver/webserver etc.
    More to come.. Its a little difficult some times, this using a forum, a lot gets lost in translation. By the way, I'm from denmark, copenhagen area.. Which country are you from? I'm just a little nosy ;) you know, its fun to know where the people you are talking to are sitting on the globe ;)

    Returning after reinstallation completed - and the nameserver records re-done :)

    PS! This was one of my issues before "killing" the server - and doing a reinstall
    These fail messages was prompted after an update:

    * Stopping Courier IMAP-SSL server imapd-ssl
    ...done.
    * Starting Courier IMAP-SSL server imapd-ssl
    ...done.
    * Stopping Courier POP3 server...
    ...done.
    * Starting Courier POP3 server...
    ...done.
    * Stopping Courier POP3-SSL server...
    ...done.
    * Starting Courier POP3-SSL server...
    ...done.
    * Restarting web server apache2
    [Fri Mar 29 21:24:28 2013] [warn] NameVirtualHost *:443 has no VirtualHosts
    [Fri Mar 29 21:24:28 2013] [warn] NameVirtualHost *:80 has no VirtualHosts
    [Fri Mar 29 21:24:29 2013] [warn] NameVirtualHost *:443 has no VirtualHosts
    [Fri Mar 29 21:24:29 2013] [warn] NameVirtualHost *:80 has no VirtualHosts
    ... waiting ...done.
    Restarting ftp server: Running: /usr/sbin/pure-ftpd-mysql-virtualchroot -l mysql:/etc/pure-ftpd/db/mysql.conf -l pam -u 1000 -8 UTF-8 -H -O clf:/var/log/pure-ftpd/transfer.log -A -D -b -E -B
    Update finished.



    Kind Regards,
    Dan
     
  12. danhansen@denmark

    danhansen@denmark HowtoForge Supporter

    Getting close - but, do-release-upgrade before or after ISP inst.???

    Hi Darin,

    I'm getting closer, but...
    Have just posted ths: http://www.howtoforge.com/forums/showthread.php?p=295156#post295156 regarding this reinstallation. I'm not sure about what to do with the "do-release-upgrade"!?! Is it more right to do this now or after the installation of ISPConfig3 CP. Will it make any difference.
    Well, I lost some courage durin these reinstallations. Maybe because of the "long nights" without any sleep or maybe just because I would like to make it the right way ;)

    And, I am not sure about mailman either, because, I'm not quite sure if I will need it or exactly what it does - but due to the tutorial it is recommended that you install it before the ISPConfig3 CP!

    Kind Regards,
    Dan
     
  13. darinpeterson

    darinpeterson HowtoForge Supporter

    Dan,

    I'm from the US, though, i have Danish heritage in my family.

    There is nothing of a huge deal in any of what you posted above. You obviously installed Courier. The services are just being configured.

    As for the NameVirtualHost issue... This just started appearing on my servers on the install of ISPConfig 3.0.5.2. I've had an open question about it, but nobody replying to it.

    Yes, I'm sure you're a bit loopy from no sleep, but feel free to ask explicit questions if you have them.

    Darin
     
  14. falko

    falko Super Moderator

    Just ignore these warnings.
     
  15. danhansen@denmark

    danhansen@denmark HowtoForge Supporter

    Will do just that ;)

    Hi Darin and Falko,

    I ill do just that ;)
    Thanks, both of you!

    I am getting pretty close, but still some beginners-errors I think it may be. But not lazy mistakes - have been reading more than 200 pages of the manual ;) Please, will you take a look at this thread's last post: http://www.howtoforge.com/forums/showthread.php?t=61257

    Looking forward to hear from you..

    Kind Regards,
    Dan
     
  16. darinpeterson

    darinpeterson HowtoForge Supporter

    A better recommendation.

    Hi Dan,

    I now have more experience with mail servers. Having run Courier for a long while, I recently spent some time researching recommendations and reviews. After having done that, I have migrated to Dovecot. It has better memory management and it's easier to configure...

    Not sure that helps at this point, but I wanted to follow up with this information...

    Regards,
    Darin
     
  17. danhansen@denmark

    danhansen@denmark HowtoForge Supporter

    Dovecot User To Be :)

    Hi Darin,

    Thanks!
    But of course it helps.. This I will put in my ToDo-Box because I have been hearing about this "Dovecot/Courier" fight for a long time. I too will migrate to "Dovecot" when I am ready :)

    PS! Did you se my message regarding the server now is up and running? Havent read all my new posts yet so I don't know if you have responded to any of them ;)

    Kind Regards,
    Dan
     
  18. darinpeterson

    darinpeterson HowtoForge Supporter

    Sure you're welcome Dan...

    I look at the Linux forums daily, but have not seen your other posts. Feel free to send me a private message with links, if you want me to take a look.

    Best regards,
    Darin
     

Share This Page