Proper configuration of Virtual Hosts SSL

632

It looks to me that you are not specifying a 443 port or a 80 port for the virtual host. So everything is heading towards the virtual host which is configured for SSL. So http traffic is not being accepted as it is configured to only accept SSL. Try this

NameVirtualHost *:80

<VirtualHost *:80>
   ServerName blah
   DocumentRoot /var/www/html/

</VirtualHost>


<VirtualHost *:443>

 ...
 - your config here -
 ...

</VirtualHost>

You could even do a redirect for the virtual host running on port 80. Maybe something like this:

Redirect permanent / https://<URL>
Share:
632

Related videos on Youtube

Sid
Author by

Sid

Updated on September 18, 2022

Comments

  • Sid
    Sid over 1 year

    I'm working with Typescript 2.4 and being stuck with a simple modulo operation :

    I wrote a simple unit test of modulo operator to explain my problematic

    fit('TypeScript should be able to do a simple mathematic modulo : ', () => {
      expect(318.08 % 60).toBe(18.08);
    });
    

    And as you can guess... this test fail (Expected 18.079999999999984 to be 18.08.).

    What did i miss ?

    As you wan see google is better as this game :D : https://www.google.fr/search?q=318.08+%25+60&oq=318.08+%25+60&gs_l=psy-ab.3...2056882.2060253.0.2061466.11.11.0.0.0.0.440.1441.2j2j1j1j1.7.0....0...1.1.64.psy-ab..4.5.1213...0j35i39k1j0i5i30k1.W8XFPAxxO44

  • seedg
    seedg over 11 years
    First of all thanks for the reply. I tried this but could not access it via SSL. Please check my edit for more information on the configuration.
  • seedg
    seedg over 11 years
    Ok i see what you did as I managed to solve it. Every other virtual host was with the notation <VirtualHost *> and I had NameVirtualHost * at the beginning. This had to be changed with the 2 you mentioned all all others virtual hosts had to be changed to *:80 instead of just *