Tuesday, June 24, 2025

When refresh the react page getting 404 not found error

 My development team is working on React and Nodejs combination, after deployment the links are working but when we do a refresh on the working page getting "404 not found error"

Solution.

Make sure you have AllowOverride All

In your document root, vi .htaccess

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>

Now try refresh, it will work.

Monday, March 3, 2025

How to configure Mysql root password on Oracle Linux 8

How to configure Mysql root password on Oracle Linux 8




  • Login to your server as root.
  • By default, there is no password for mysql root.
  • mysql -u root -p
  • Alter user 'root'@'localhost' identified WITH mysql_native_password by 'StrongPassword';
  • flush privileges;
  • exit;

Now, try to connect to Mysql as root user. It works!

Thursday, January 16, 2025

git@github.com: Permission denied (publickey)

 Error when cloning git after adding SSH key. Below is the error

git@github.com: Permission denied (publickey).

fatal: Could not read from remote repository.


Fix :


First make sure you have added SSH key correctly. On right hand side of top corner under profile, you can see settings. In setting click on SSH and GPG keys and add your key as authentication keys.


Then login to the server or desktop from where you generated the key or have its private key, 

eval `ssh-agent -s`

ssh-add ~/.ssh/id_rsa


Wait for some time and try git clone, it will work.

Saturday, January 11, 2025

OCI Instance Principals Authentication


OCI Instance Principals Authentication

In OCI, one of the authentication mechanism is using "Instance Principals". Here we don't need to use a key to execute OCI CLI commands, instead of key we are allowing OCI Compute instance the permission to execute CLI commands.

In this video you can see the steps.

1. Get the OCID of the compute instance
2. Create a Dynamic group
3. Create a Policy
4. Validate the setup
5. Execute your CLI commands {oci os object put --bucket-name backup-bucket --file sc_laundry_db-202412181734507003.sql --auth instance_principal}

Few Links for further read

Saturday, October 26, 2024

how to install letsencrypt on oracle linux 8

 how to install letsencrypt on oracle linux 8

1. Login to the server as root

2. dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

3. dnf install certbot python3-certbot-apache

4. certbot --apache

Saturday, August 17, 2024

Errors during downloading metadata for repository 'appstream': - Curl error (6): Couldn't resolve host name for http://mirrorlist.centos.org/?release=8-stream&arch=x86_64&repo=AppStream&infra=stock [Could not resolve host: mirrorlist.centos.org]

 Error while installing a package in CentOS 8

Errors during downloading metadata for repository 'appstream':   - Curl error (6): Couldn't resolve host name for http://mirrorlist.centos.org/?release=8-stream&arch=x86_64&repo=AppStream&infra=stock [Could not resolve host: mirrorlist.centos.org]

How to fix?

1. Login to the server

2. cd /etc/yum.repos.d/

3. sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*

4. sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

5. yum install <package>

It works!

Thursday, May 23, 2024

SSLCertificateFile: file '/etc/pki/tls/certs/localhost.crt' does not exist or is empty

 Error on Oracle linux9

After installing Letsencrypt, i am getting this error "SSLCertificateFile: file '/etc/pki/tls/certs/localhost.crt' does not exist or is empty" when trying to execute certbot --apache

How to fix :

systemctl restart httpd

After this, you can successfully execute the command certbot --apache and the issue if solved.