Can I configure my own hosts file in DA? (reseller account)

Rog

Verified User
Joined
Sep 27, 2016
Messages
20
I've got a reseller account on a hosting server using DA 1.50.1.

Can I configure or specify a custom hosts file, so that I can override some external domain names to fixed IP addresses?
 
I dont think so, it needs root account.

OK thanks. With "it needs root account" do you mean to set it up, or also to actually use it? I mean does it require root access to enable this feature, or to configure a custom hosts file, and once they do so, I can use and customize my own hosts file myself?

Because then I could inform with the server admin or hosting provider (who has root access) to set this up for me.
 
It won't work anyway.
The hosts file is only used locally, not remote. So if you visit your server from external source the hosts file won't be used.
 
It won't work anyway.
The hosts file is only used locally, not remote. So if you visit your server from external source the hosts file won't be used.

Sure, yes I understand it works only locally. The reason for my inquiry is I want to be able to override some domain names (sometimes just temporarily) when used by php, python and bash scripts. For example, if some php function or a bash script connects to example.com somewhere, I need to redirect it to another IP in certain cases.

This is 100% server side and irrelevant for the user, a visitor is of course never affected by any hosts file on the server.
 
You'd better open a ticket with your hosting company and discuss this possibility with them. If you have only reseller account we can't help you with it.

If the server which you are hosted on is configured to use 127.0.0.1 as a DNS resolver:

Code:
nameserver 127.0.0.1

you could try and add your desired domain with a desired IP in DNS manager.

I'm not aware on why you want to forge a domain... I hope you don't try to do anything illegal, anyway it's up to your hoster to solve the inquiry.
 
I'm not aware on why you want to forge a domain... I hope you don't try to do anything illegal,
I understand your concern, but no :) This was due to an external service (API) we are using, that suffered from a DNS problem. I wanted to temporarily override this by using a fixed IP.

Anyway, thanks, I'll get back with my hosting provider on this.
 
Back
Top