Resolved: Fix SSL renewal issue on Gitlab Server

PROBLEM : I had hosted a gitlab server on Azure and it was not getting autorenewed. SOLUTION :  1. Check the current SSL cert path: sudo grep -n "ssl_certificate" /var/opt/gitlab/nginx/conf/gitlab-http.conf OR sudo grep -n "ssl_certificate" /etc/gitlab/gitlab.rb  You are likely to see something like this: nginx['ssl_certificate'] = "/etc/gitlab/ssl/gitlab.example.com.crt" nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/gitlab.example.com.key"  2. In my case, I was using gitlab let'sencrypt. So, I installed certbot. sudo apt update && sudo apt install certbot -y  3. Obtain Fresh Certificate sudo gitlab-ctl stop nginx sudo certbot certonly --standalone -d gitlab.yourdomain.com sudo gitlab-ctl start nginx 4. Configure Gitlab to use new cert external_url "https://gitlab.yourdomain.com" letsencrypt['enable'] = false nginx['s...

Resolved: SSL Certificate Problem: unable to get local issuer certificate when doing Woocommerce Integration

 Hey Friends,

In this blog, I am going to share how I solved SSL Certificate problem on my local environment of php when I was doing a woocommerce integration.

I am talking about Woocommerce only, however, the concept is same when you want to connect with any api which is using https

PROBLEM:

  1. I have a website based on Wordpress using Woocommerce using https
  2. I need to populate the products from the website on my custom application and hence I was using local php environment.
  3. I was using WAMP for the development purposes.
  4. I was following Woocommerce Rest API documentation to do the development
  5. I got the error "unable to get local issuer certificate"
SOLUTION: 

  1. Download cacert.pem from the official curl website 
  2. Open php ssl folder and place the cert there. In my case it was:
    C:\wamp64\bin\php\php7.4.9\extras\ssl
  3. If you use different version of php development server, make sure you place the file in the correct folder. Check  php version with command
    php --version
  4. Open php.ini file and look for openssl.cafile and add the path of your certificate
  5. Restart Apache/WAMP and if you are using VSCode terminal, simply restart VSCode
  6. Yay! your problem should be solved.
Happy Coding!!!