Pages

Showing posts with label SSL. Show all posts
Showing posts with label SSL. Show all posts

Saturday, February 20, 2021

WILD CARD SSL for Sub Domains. in apache Server Ubuntu using Certbot

 

##### ===================================================
WILD CARD SSL for Sub Domains.

##### ===================================================

=> sudo certbot certonly --manual -d *.example.com -d example.com --agree-tos --no-bootstrap --manual-public-ip-logging-ok --preferred-challenges dns-01 --server https:acme-v02.api.letsencrypt.org/directory//

This records should be added as TXT records in DNS

_acme-challenge.ampbk.com with the following value:

vMuf4mcFeV7aP36a9idiuskjhSeh992Q7SL6R-8N4wFSs

Before continuing, verify the record is deployed.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Press Enter to Continue

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please deploy a DNS TXT record under the name
_acme-challenge.ampbk.com with the following value:

00HYjN4kOskrT2atQgaKz-4856QQkmrrZvZwHNeQz

/etc/letsencrypt/live/example.com/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/exmple.com/privkey.pem


create s.example.com.conf
and update ssl to these SSL files

Deactivate the site and activate the
sudo a2dissite example.com
sudo service apache2 restart

sudo a2ensite example.com
sudo a2ensite s.example.com

then restart the apache2 service.

sudo service apache2 restart.

Tuesday, September 1, 2020

Laravel Redirect HTTP to HTTPS via .htaccess

 Today, i share with you, redirect http to Https in laravel
You create file .htaccess in root laravel

 

RewriteEngine On
RewriteRule ^(.*)$ public/ [L]
 
Way code above it redirect to http, if you want http to https, 
you can using following code above 

 

<IfModule mod_rewrite.c>
    RewriteEngine On        
  RewriteCond %{HTTPS} !=on    
  RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  RewriteRule ^(.*)$ public/ [L]
</IfModule>