Problems with Namevirtualhosts and SSL

Discussion in 'Installation/Configuration' started by bizkid64, May 10, 2012.

  1. bizkid64

    bizkid64 New Member

    I've set up ISPConfig 3 based servers several times, but I haven't had this problem before. Makes me think I'm missing something obvious.

    I just a clean install of Debian Squeeze & ISPConfig3 using the Perfect Server and Extending the Perfect Server how-to's.

    During set up, I set eth0 to 192.168.0.100, and eth0:0 to my external IP of 67.41.xxx.xxx), and I chose the access ISPConfig control panel through SSL option.

    I would like to set up one SSL site on this server for right now, so I have set the Server IP (System > Server IP Addresses > IP Addresses) to my external IP (67.41.xxx.xxx) and left the HTTP NameVirtualHost box unchecked.

    I then create a website (Sites > Website > Web Domain) and select the 67.41.xxx.xxx ip address from the IPv4 drop down box, enter my domain name (casemanagerbk.com), select www. as the auto-subdomain and check the SSL box and leave everything else on the default settings.

    At this point, the ls -la output of /var/www/clients/client1 is
    Code:
    drwxr-xr-x 3 root root    4096 May 10 11:44 .
    drwxr-xr-x 3 root root    4096 May  8 15:24 ..
    lrwxrwxrwx 1 root root      30 May 10 11:44 casemanagerbk.com -> /var/www/clients/client1/web1/
    drwxr-x--x 6 web1 client1 4096 May 10 11:44 web1
    
    and the ls -la output of /etc/apache2/sites-available is
    Code:
    drwxr-xr-x 2 root root 4096 May 10 11:46 .
    drwxr-xr-x 7 root root 4096 May  9 10:57 ..
    -rw-r--r-- 1 root root 1022 May  8 15:13 apps.vhost
    -rw-r--r-- 1 root root 2849 May 10 11:46 casemanagerbk.com.vhost
    -rw-r--r-- 1 root root  692 Apr  1 00:39 default
    -rw-r--r-- 1 root root 7251 Apr  1 00:39 default-ssl
    -rw-r--r-- 1 root root 1339 May 10 11:41 ispconfig.conf
    -rw-r--r-- 1 root root 1776 May  9 08:31 ispconfig.vhost
    
    However, when accessing the site, I am only seeing the apache server default page "It works!," not the ISPConfig default index.html file in the web1/web folder. If I change the website IPv4 setting to "*", then I can see the proper index.html file.

    I then create the SSL certificate, and save my StartSSL certificate in the field.

    I am still able to access the site over http:, but not through https:. I think the problem here is that I still have the "*" selected in the site's IPv4 setting, but changing it the IP address results in getting the server default page again.

    Any help getting the right settings here would be appreciated.
     
  2. pititis

    pititis Member

    you will check HTTP namevirtualhost if you want to use this ip in virtual hosts. after that use the ip instead * for your ssl site. Also you can use SNI for several certificates in that ip

    cheers
     
  3. bizkid64

    bizkid64 New Member

    Pititis -

    I sincerely thank you for the reply, but what you tell me to do is exactly what isn't working. It should, and it has every time I've installed this before, but not now.

    The fact that what you suggest isn't working is exactly the source of my frustration.

    So thank you, but I can't call the problem solved yet.
     
  4. falko

    falko Super Moderator Howtoforge Staff

    I guess you used the wrong IP. You must use an IP that you can see in the output of
    Code:
    ifconfig
     
  5. bizkid64

    bizkid64 New Member

    I double-checked the IP in my static block, what I set up in /etc/network/interfaces, and what outputs from ifconfig. Here's the output from ifconfig:

    Code:
    eth0      Link encap:Ethernet  HWaddr 00:0d:56:bb:8f:f8
              inet addr:192.168.0.100  Bcast:192.168.0.255  Mask:255.255.255.0
              inet6 addr: fe80::20d:56ff:febb:8ff8/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:10921 errors:0 dropped:0 overruns:0 frame:0
              TX packets:8313 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:4241766 (4.0 MiB)  TX bytes:2224915 (2.1 MiB)
              Interrupt:28
    
    eth0:0    Link encap:Ethernet  HWaddr 00:0d:56:bb:8f:f8
              inet addr:192.168.0.101  Bcast:192.168.0.255  Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              Interrupt:28
    
    eth0:1    Link encap:Ethernet  HWaddr 00:0d:56:bb:8f:f8
              inet addr:192.168.0.103  Bcast:192.168.0.255  Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              Interrupt:28
    
    eth0:2    Link encap:Ethernet  HWaddr 00:0d:56:bb:8f:f8
              inet addr:192.168.0.105  Bcast:192.168.0.255  Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              Interrupt:28
    
    eth0:3    Link encap:Ethernet  HWaddr 00:0d:56:bb:8f:f8
              inet addr:192.168.0.107  Bcast:192.168.0.255  Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              Interrupt:28
    
    eth0:4    Link encap:Ethernet  HWaddr 00:0d:56:bb:8f:f8
              inet addr:192.168.0.109  Bcast:192.168.0.255  Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              Interrupt:28
    
    eth0:5    Link encap:Ethernet  HWaddr 00:0d:56:bb:8f:f8
              inet addr:192.168.0.111  Bcast:192.168.0.255  Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              Interrupt:28
    
    eth0:6    Link encap:Ethernet  HWaddr 00:0d:56:bb:8f:f8
              inet addr:192.168.0.113  Bcast:192.168.0.255  Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              Interrupt:28
    
    eth0:7    Link encap:Ethernet  HWaddr 00:0d:56:bb:8f:f8
              inet addr:192.168.0.115  Bcast:192.168.0.255  Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              Interrupt:28
    
    eth0:8    Link encap:Ethernet  HWaddr 00:0d:56:bb:8f:f8
              inet addr:192.168.0.117  Bcast:192.168.0.255  Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              Interrupt:28
    
    eth0:9    Link encap:Ethernet  HWaddr 00:0d:56:bb:8f:f8
              inet addr:192.168.0.119  Bcast:192.168.0.255  Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              Interrupt:28
    
    eth0:10   Link encap:Ethernet  HWaddr 00:0d:56:bb:8f:f8
              inet addr:67.41.184.217  Bcast:67.255.255.255  Mask:255.0.0.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              Interrupt:28
    
    eth0:11   Link encap:Ethernet  HWaddr 00:0d:56:bb:8f:f8
              inet addr:67.41.184.218  Bcast:67.255.255.255  Mask:255.0.0.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              Interrupt:28
    
    eth0:12   Link encap:Ethernet  HWaddr 00:0d:56:bb:8f:f8
              inet addr:67.41.184.219  Bcast:67.255.255.255  Mask:255.0.0.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              Interrupt:28
    
    eth0:13   Link encap:Ethernet  HWaddr 00:0d:56:bb:8f:f8
              inet addr:67.41.184.220  Bcast:67.255.255.255  Mask:255.0.0.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              Interrupt:28
    
    eth0:14   Link encap:Ethernet  HWaddr 00:0d:56:bb:8f:f8
              inet addr:67.41.184.221  Bcast:67.255.255.255  Mask:255.0.0.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              Interrupt:28
    
    lo        Link encap:Local Loopback
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:10010 errors:0 dropped:0 overruns:0 frame:0
              TX packets:10010 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:833585 (814.0 KiB)  TX bytes:833585 (814.0 KiB)
    
    
    The problem seems to be coming from the fact that I cannot get anything to be served through the public IP address 67.41.184.xxx unless I check the NameVirtualHost box when setting up the server IP, and I also set the website IP address in the Site configuration dialog to "*." If I do that, I can get the right content to serve through http, but nothing through https.
     
  6. falko

    falko Super Moderator Howtoforge Staff

    Yes, you must check NameVirtualHost. Also make sure you include port 443 (https) in the ports list.
     

Share This Page