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: php version in .htaccess is getting overridden in Wordpress

 Are you making any websites on WordPress? WordPress is a great content management system and is a choice for millions of developers.

While it is super easy to get started on WordPress, sometimes the developers or content creators face issues that are hard to diagnose and easy to resolve.

One such issue is if your hosting supports multiple versions then the php version may get overridden in case you are not taking care of the following small thing.

Anything that is written between the following directives in .htaccess file will be overridden by wordpress.


# Begin Wordpress
// Do not put anything custom here. This section will be overridden by Wordpress
# End Wordpress

And how do you specify the version that you want to use for your wordpress? Here is what you should do

e.g using php 7.4

	
  		# php -- BEGIN cPanel-generated handler, do not edit
		# Set the “ea-php74” package as the default “PHP” programming language.
		
  			AddHandler application/x-httpd-ea-php74 .php .php7 .phtml
		
		# php -- END cPanel-generated handler, do not edit
	

e.g using php 8.1

	
      # php – BEGIN cPanel-generated handler, do not edit
      # Set the “ea-php81” package as the default “PHP” programming language.
      
          AddHandler application/x-httpd-ea-php81___lsphp .php .php8 .phtml
      
      # php – END cPanel-generated handler, do not edit