I have a CentOS 6.3 server, running Apache and have DirectAdmin installed.

I have created what will be a new domain, but I do not have a domain name yet. For now I have created, lets say, mydomain.com.

Internally, DirectAdmin have created a structure like this


inside this public_html there is an index.html page.

How do I access that page by IP, using a browser? Supposing my IP is


closed as off-topic by HopelessN00b Apr 9 '15 at 15:49

  • This question does not appear to be about server, networking, or related infrastructure administration within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.


You will need to configure IP-Based Virtual Host.

You can do that by editing your apache/httpd.conf file, add something like this:

ServerAdmin rubberduck@mydomain.com
DocumentRoot /home/admin/domains/mydomain.com/public_html
ServerName site.mydomain.com
ErrorLog /var/log/httpd/logs/site/error_log
TransferLog /var/log/httpd/logs/site/access_log

Also, you can find some great information on Apache Official Site - Virtual Host Section. Just bear in mind that the DocumentRoot should be specified without a trailing slash.

But, just so you know, you can edit your hosts file like so: host.mydomain.com

And then just browse to http://host.mydomain.com

Not the answer you're looking for? Browse other questions tagged or ask your own question.