Cannot set up https on microsoft azure VM

7,442

The problem has been solved. Appereantly theres a bug in microsoft azure frontends ACLs. I had no reles applied so it means it should allow all trafic on that frontend. Instead it was filterring everything. To fix that i denied a random ip address so a rule to "allow every but this one" would start working. After that i could acces my site with https. Thank you for help.

Share:
7,442

Related videos on Youtube

Łukasz Przeniosło
Author by

Łukasz Przeniosło

I am an experienced electrical and embedded software engineer. When it comes to electronics, coding and cake, I push it to the limits.

Updated on September 18, 2022

Comments

  • Łukasz Przeniosło
    Łukasz Przeniosło over 1 year

    For over a week now I am trying to set up https to work with my owncloud hosted on a Microsoft Azure virtual machine (ubuntu server 14.04). I am using apache2. I have gone through every single tutorial i have found on the web and also one person on the owncloud forums was trying to help for a while but the preblem is still unsolved.

    I am wondering now is there anything unusual about a linux system that is hosted on microsoft azure? Because this ssl setup as far as ive learned for past couple of days should pretty much work out of the box. I am wondering either this has anything to do with the fast that I have added HTTPS frontend after the VM was created, not in the process of its creation. Anyways I am listening to 443 port and i have ssl enabled, I have created the keys pair and turned on the ssl engine.

    Also Debian man pages etc. Here are my logs and virtual host for ssl:

    default-ssl.conf in sites-available:

    https://pastebin.com/jvhPpDKa

    My rep is to low to post more than 2 links, so here I pase a link to my post from owncloud forums where one can see pastebins with my netstat and acces + errors logs:

    https://forum.owncloud.org/viewtopic.php?f=31&t=26375&start=20#p80237

    Im really desperate right now, I have no idea why cant I connect to my server using https... I would really aprichiate all help!

  • Łukasz Przeniosło
    Łukasz Przeniosło about 9 years
    Yes, i did. I think this might be the case- that even though it is enabled, it doesnt work.
  • GilK
    GilK about 9 years
    I noticed that in your netstat that apache is listening on 443, but only tcp6. Maybe try to get it to bind to tcp4 and see if that makes a difference? I guess changing the <VirtualHost *:443> to <VirtualHost 0.0.0.0:443> and restart apache might do it, but I haven't tried.
  • GilK
    GilK about 9 years
    See if you can find the Listen 443 option in /etc/apache2/ports.conf and change that also to Listen 0.0.0.0:443
  • Łukasz Przeniosło
    Łukasz Przeniosło about 9 years
    Now i see port 443 in tcp, but https still doesnt work. pastebin.com/a6Ps2uTt
  • Łukasz Przeniosło
    Łukasz Przeniosło about 9 years
    do you have any other ideas?
  • GilK
    GilK about 9 years
    You can check if you can get anything from apache at the server console. Run the command "curl https://localhost" or "curl https://<internal ip address>" and see if you get anything to download.
  • Łukasz Przeniosło
    Łukasz Przeniosło about 9 years
    i have tried what u suggested- when curled with localhost it worked, i downloaded the page. However when I curled my public page address (vm.mydomain.com) i got connection timeout.... What does this mean?