Showing posts with label apache2. Show all posts
Showing posts with label apache2. Show all posts

Wednesday 5 June 2019

How to install letsencrypt SSL certificate on Ubuntu 14.04 apache

Download the Let’s Encrypt Client
Step 1 : sudo add-apt-repository ppa:certbot/certbot
Step 2 : sudo apt-get update
Step 3 : sudo apt-get install python-certbot-apache
Set Up the SSL Certificate
Step 4 : 

sudo certbot --apache -d jaydipkansagra.com
OR
sudo certbot --apache -d jaydipkansagra.com -d www.jaydipkansagra.com
Verifying Certbot Auto-Renewal
Step 5 : sudo certbot renew --dry-run

Wednesday 6 June 2018

How to Switch / Change / Downgrade from PHP 7.2 to 7.1 on Ubuntu 16.04 / 18.04 , Apache | PHP

Follow following steps

1. sudo add-apt-repository ppa:ondrej/php
2. sudo apt-get update
3. sudo apt-get install php7.1
4. sudo apt-get install php7.1-cli php7.1-common php7.1-json php7.1-opcache php7.1-mysql php7.1-mbstring php7.1-mcrypt php7.1-zip php7.1-fpm
5. sudo a2dismod php7.2
6. sudo a2enmod php7.1
7. systemctl restart apache2
8. sudo rm /usr/bin/php
9. sudo ln -s /usr/bin/php7.1 /usr/bin/php

Tuesday 12 December 2017

How to Enable SSL certificate in cloud.google.com

How to Enable SSL certificate in cloud.google.com


Open cloud.google.com
1. Goto your VM instance
2. Click on name of your instance
3. Edit instance
4. Checked "Firewalls Allow HTTPS traffic" and save


5. Goto Network services -> Load balancing -> Edit / add your Load balancer
6. Add / Edit "https protocol" on Frontend configuration and select / create new certificate




7. Again goto your VM instance list
8. Click on SSH



9. After open google cloud ssh window, write "sudo su" on ssh window
10. ssh-keygen
11. gcloud compute ssl-certificates list
12. gcloud compute ssl-certificates describe ssl2111(name of your ssl certificate)
13. nano /etc/apache2/sites-available/default-ssl.conf
Upload certificate files and update path here where you place your SSLCertificateFiles
<IfModule mod_ssl.c>
    <VirtualHost _default_:443>
        ServerAdmin webmaster@localhost
        <Directory /var/www/html/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            allow from all
    </Directory>
    DocumentRoot /var/www/html

    ..........
    ..........
    ..........
    ..........
    #SSLCertificateFile     /etc/ssl/certs/ssl-cert-snakeoil.pem
    #SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
    SSLCertificateFile "/var/www/html/cert/cert.pem"
    SSLCertificateKeyFile "/var/www/html/cert/privkey.key"
    SSLCertificateChainFile "/var/www/html/cert/chain.crt"
    ..........
    ..........
    ..........
    ..........
</VirtualHost>
</IfModule>

14. sudo service apache2 restart
15. gcloud auth login
16. gcloud config set project projectname-010412(Your project id)
17. sudo a2ensite default-ssl
18. service apache2 reload
19. sudo a2enmod ssl
20. sudo service apache2 restart
21. gcloud compute firewall-rules create www-firewall     --target-tags https-tag --allow tcp:443
22. service apache2 reload 

That's It, Please check your SSL