Announcement

Collapse
No announcement yet.

Where is the hosts file?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Where is the hosts file?

    I need to redirect the entire server to a domain and IP

  • #2
    Usually I find it at /etc/hosts but I can spot it on CloudLinux. Is it in another location" I just need to point the entire VM (not just on user) to a new IP for a certain domain name.

    Tks for your help~

    Comment


    • #3
      I found the location and it seems to work fine:

      /var/cagefs/0#/ACCOUNT-NAME/etc/hosts

      But that changes it only per account, so I am making all the accounts the same. Is there a way to change only 1 hosts file for entire server for all accounts?

      Comment


      • #4
        For entire server you have to edit main /etc/hosts file then update users with:

        Code:
        cagefsctl --force-update-etc

        Comment


        • #5
          I think my eyes need new glasses 8)

          I do see /etc/hosts now in its correct location -- I swear it wasnt there before Ok, all is fine now.

          Comment

          Working...
          X