Posted By Shahid Malla

Fixing cPanel Curl Not Found Issue due to Missing Hostname and Nameservers - Shahid Malla - WHMCS Expert Freelancer

The tutorial addresses the cPanel curl not found issue caused by missing hostnames and nameservers. It provides a step-by-step guide to set up the hostname, update the /etc/hosts file, configure nameservers, restart the networking service, and verify changes.

  1. Open Terminal or SSH into your server:
    Use your preferred terminal or SSH client to connect to your server.
  2. Set the Hostname:
    Run the following command to set the hostname:
   hostnamectl set-hostname yourhostname.example.com

Replace “yourhostname.example.com” with your desired hostname.

  1. Update the /etc/hosts file:
    Open the /etc/hosts file using a text editor:
   nano /etc/hosts

Add the following line:

   your_server_ip yourhostname.example.com

Save and exit.

  1. Update Nameservers:
    Edit the /etc/resolv.conf file:
   nano /etc/resolv.conf

Add your nameservers:

   nameserver 8.8.8.8
   nameserver 8.8.4.4

Replace these with your preferred nameservers. Save and exit.

  1. Restart Networking Service:
    Restart the networking service to apply changes:
   systemctl restart network
  1. Verify Changes:
    Check if the hostname is set correctly:
   hostname

It should display your chosen hostname.

  1. Verify Curl:
    Test if curl is now working:
   curl http://google.com

Replace “google.com” with any valid URL. If the curl is working, you’ve resolved the issue.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x