Thursday, June 4, 2015

Install SSL LAMP stack on Azure Ubuntu 14.04 LTS

Thursday, June 04, 2015 Posted by Andre Broers
sudo apt-get update
sudo apt-get install lamp-server^

sudo a2enmod ssl
sudo service apache2 restart
sudo mkdir /etc/apache2/ssl

sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.crt

And fill in all the fields.

sudo vi /etc/apache2/sites-available/default-ssl.conf

alter these lines:
        <VirtualHost _default_:443>
                #   SSLCertificateFile directive is needed.
                SSLCertificateFile      /etc/apache2/ssl/apache.crt
                SSLCertificateKeyFile /etc/apache2/ssl/apache.key

sudo a2ensite default-ssl.conf

sudo service apache2 restart

browse to the new https endpoint and the ubuntu example page will show up.