HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   Developers' Forum (
-   -   https on new v3 port 8080 (

tom88 13th October 2008 17:29

https on new v3 port 8080
installed ispconfig v3.0.0.7 and noticed that access to admin interface was clear text ..
Wanting ssl, I did some research and came up with the following quick how to.
I'm using ubuntu 8.04 and had followed falko's perfect install.... yeah I now read I shouldn't have, but I didn't know at the time that v3beta didn't want this :).
It seems to be working... had to change out proftpd for pureftp etc ..
any way .. the steps I used to get the admin interface to be on https was:
mkdir /etc/apache2/ssl
cd /etc/apache2/ssl
openssl genrsa -des3 -out server.key 4096
openssl req -new -key server.key -out server.csr
openssl x509 -req -days 3650 -in server.csr -signkey server.key -out server.crt
openssl rsa -in server.key -out server.key.insecure
mv server.key
mv server.key.insecure server.key
a2enmod ssl
vi /etc/apache2/sites-available/ispconfig.vhost
insert the fallowing near the top:
<VirtualHost _default_:8080>
ServerAdmin webmaster@localhost
DocumentRoot /usr/local/ispconfig/interface/web/

SSLEngine On
SSLCertificateFile /etc/apache2/ssl/server.crt
SSLCertificateKeyFile /etc/apache2/ssl/server.key
restart apache2
/etc/init.d/apache2 restart

vogelor 25th March 2009 21:52

if you are doing a update, then the "default" vhost-file overrides the old one. to avoid these, do not change the ispconfig.vhost but create your OWN file (with a different name). do this inside the sites-available. then CHANGE the soft-link inside the sites-enabled - directory (to link to YOUR file instead of the default one.).

the update.php script overrdes the ispcongif-FILE but NEVER the soft-link. so after a update, the FILE ist overriden, but not the link (pointing to YOUR file).

hope it is clear, what i mean. if not - ask!


bazza 16th June 2009 13:20

SSL Enforced
Thanks for the above info. Personally I think https should be the default for a connection to a control panel. I think this could be done in a htaccess file but I'm new to ISPC3 and I need to have a poke around to see why its configured the way it is before I start bending it.

Master One 25th June 2009 21:52

I guess the described method is still the only valid way to do it, right?

I also think, that ISPConfig should only be accessible by https, the same goes for phpmyadmin and webmail.

TokyNET 26th June 2009 20:00

Is this still the way to do this? I ask because all of this is already in my conf file (or maybe im not clear if that is "add the following AFTER this lines...)


<VirtualHost _default_:8080>
ServerAdmin webmaster@localhost
DocumentRoot /usr/local/ispconfig/interface/web/

So, this is the top of my ispconfig.vhost file, please tell me what and where i should add what you mentioned on the "how-to".


<VirtualHost _default_:8080>
ServerAdmin webmaster@localhost
  <IfModule mod_fcgid.c>
    DocumentRoot /var/www/ispconfig/
    SuexecUserGroup ispconfig ispconfig
    <Directory /var/www/ispconfig/>
      Options Indexes FollowSymLinks MultiViews +ExecCGI
      AllowOverride AuthConfig Indexes Limit Options FileInfo
      AddHandler fcgid-script .php
      FCGIWrapper /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter .php
      Order allow,deny
      Allow from all

  <IfModule mod_php5.c>
    DocumentRoot /usr/local/ispconfig/interface/web/
    AddType application/x-httpd-php .php
    <Directory /usr/local/ispconfig/interface/web>
      Options FollowSymLinks
      AllowOverride None
      Order allow,deny
      Allow from all
          php_value magic_quotes_gpc        0

  # ErrorLog /var/log/apache2/error.log
  # CustomLog /var/log/apache2/access.log combined
  ServerSignature Off


Besides that, now I get this from apache when i try to start it:

[root@cornpops ~]# /etc/init.d/httpd start
Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:443
(98)Address already in use: make_sock: could not bind to address
no listening sockets available, shutting down
Unable to open logs

Thanks for any assistance in this matter.

TokyNET 26th June 2009 20:05

BTW, this is the output of netstat -an, oddly enough, there is nothing listening on 80 or 443....


netstat -an | grep LISTEN | grep -v ACC
tcp        0      0 XX.XX.189.148:53*                  LISTEN
tcp        0      0 XX.XXX.189.123:53*                  LISTEN
tcp        0      0      *                  LISTEN
tcp        0      0        *                  LISTEN
tcp        0      0  *                  LISTEN
tcp        0      0  *                  LISTEN
tcp        0      0      *                  LISTEN
tcp        0      0    *                  LISTEN
tcp        0      0 ::1:53                      :::*                        LISTEN
tcp        0      0 :::21                      :::*                        LISTEN
tcp        0      0 :::22                      :::*                        LISTEN
tcp        0      0 :::993                      :::*                        LISTEN
tcp        0      0 :::995                      :::*                        LISTEN
tcp        0      0 :::110                      :::*                        LISTEN
tcp        0      0 :::143                      :::*                        LISTEN

TokyNET 27th June 2009 19:50

Since it seems i'm the only one reading this post.

I found my problem for apache not starting...

I had installed mod_ssl through yum...and it started to conflict with something that was already installed for ssl, although I have NFI of what can be providing ssl to apache if not mod_ssl... so anyways, I uninstalled the mod_ssl that I installed through yum and that was it. Now apache starts again.

However, I still don't have ssl enabled anywhere...This is really upsetting. I'm not sure what the major malfunction is. I don't seem to find any meaningful errors from apache when I try to access anything https on my server.

I have not dealt with apache besides getting it up and running...(and usually it just comes up with ssl working).

It seems to me that THIS ISSUE is a great candidate for a good How-to.
(If I do figure it out, I will post my steps here)

My previous questions still stand.

bazza 28th June 2009 12:45

Assuming you have ISPCONFIG installed correctly just do as it says.
The first part of the howto deals with generating a key pair using OPENSSL and loading the apache mod ssl.

Then edit your conf file so that the begining of it looks the same as the howto.

TokyNET 28th June 2009 22:53

Did you read and see what I pasted?

Assumption correct, however your post does not help the situation...

Besides changing the path (changing /etc/apache2/ to /etc/httpd/)
I have installed a bunch of apps and have had to create crazy ssh-tunnels to be able to login to the control pannels since I won't login in plain text to them.

So, when I put the content mentioned above and it fails misserably...meanning that apache won't start at all...

Also the line for with "a2enmod ssl" wont run at all...

Thanks in advance for any help.

Edit: "a2enmod" seems to be for debian based systems...

vogelor 29th June 2009 23:27

if your apache will not restart it is in most cases because of a dammaged ssl-certificate (the private key and the public key do not correspond together). So try to comment our the ssl section in the vhost file and restart the apache2. if this works, try regenerating your ssl-files (for me, this works fine!)


All times are GMT +2. The time now is 10:53.

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