1

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

/home/admin/domains/mydomain.com/public_html

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 100.100.100.100

thanks

Duck
  • 305
  • 2
  • 11
  • [Administration panels are off topic](http://serverfault.com/help/on-topic). [Even the presence of an administration panel on a system,](http://meta.serverfault.com/q/6538/118258) because they [take over the systems in strange and non-standard ways, making it difficult or even impossible for actual system administrators to manage the servers normally](http://meta.serverfault.com/a/3924/118258), and tend to indicate low-quality questions from *users* with insufficient knowledge for this site. – HopelessN00b Apr 09 '15 at 15:49

1 Answers1

4

You will need to configure IP-Based Virtual Host.

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

<VirtualHost 100.100.100.100:80>
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
</VirtualHost>

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:

100.100.100.100 host.mydomain.com

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

MadHatter
  • 79,770
  • 20
  • 184
  • 232
Itai Ganot
  • 10,644
  • 29
  • 93
  • 146