# \[solved\] creating a domain with webmin?

**URL:** <https://forum.virtualmin.com/t/solved-creating-a-domain-with-webmin/30253>\
**Category:** Webmin\
**Created:** [August 1, 2008, 3:07pm UTC](https://forum.virtualmin.com/t/solved-creating-a-domain-with-webmin/30253 "2008-08-01T15:07:53Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![kato](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/k/439d5e/32.png) [@kato](https://forum.virtualmin.com/u/kato)\
**Post date:** [August 1, 2008, 3:07pm UTC](https://forum.virtualmin.com/t/solved-creating-a-domain-with-webmin/30253/1 "2008-08-01T15:07:53Z")

</div>

Hi, I have a virtualmin install, but wanted to create a simple domain (not to be managed by virtualmin) where I will house a simple php script called pastebin.

I created a domain in webmin by going to Webmin -\> Servers -\> Apache Webserver. I clicked on Create virtual host tab and went to town.

Here’s what the entry looks like in my .conf file:

[code:1]  
\<VirtualHost \*\>  
DocumentRoot /home/users/kato/domains/pastebin/public\_html  
ServerName [pastebin.zentrack.net](http://pastebin.zentrack.net)  
\<Directory "/home/users/kato/domains/pastebin/public\_html"\>  
Options +Indexes  
Allow from all  
\</Directory\>  
\</VirtualHost\>  
[/code:1]

However, when I try to visit the url, it brings up the default virtualhost instead. I verified this by requesting a page that didn’t exist and visiting the default log to see what directory it’s looking in:

[code:1]  
[Fri Aug 01 12:01:19 2008] [error] [client 208.70.78.16] File does not exist: /home/default/public\_html/pastebin.php, referer: [http://pastebin.zentrack.net/25190](http://pastebin.zentrack.net/25190)  
[/code:1]

Anything else I need to set up to make this work?\<br\>\<br\>Post edited by: kato, at: 2008/08/06 06:49

---

<div class="post-metadata">

**Author:** ![Joe](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/joe/32/9_2.png) [@Joe](https://forum.virtualmin.com/u/Joe)\
**Post date:** [August 1, 2008, 3:10pm UTC](https://forum.virtualmin.com/t/solved-creating-a-domain-with-webmin/30253/2 "2008-08-01T15:10:50Z")

</div>

In a virtual hosting configuration “\*” makes no sense. It’ll never be the “first best match” for an incoming request, because there are much better matches among your Virtualmin managed virtual hosts with have 192.168.1.1:80 (at least, we strongly recommend they are ip:port based).

So, try changing to an ip:port VirtualHost and see if that works better.

This is also covered in some detail in the "Troubleshooting Common Problems" guide:

[http://www.virtualmin.com/component/option,com\_openwiki/Itemid,48/id,web\_service\_troubleshooting/](http://www.virtualmin.com/component/option,com_openwiki/Itemid,48/id,web_service_troubleshooting/)

---

<div class="post-metadata">

**Author:** ![kato](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/k/439d5e/32.png) [@kato](https://forum.virtualmin.com/u/kato)\
**Post date:** [August 1, 2008, 3:12pm UTC](https://forum.virtualmin.com/t/solved-creating-a-domain-with-webmin/30253/3 "2008-08-01T15:12:23Z")

</div>

I’ve also tried:

[code:1]  
\<VirtualHost 67.210.97.170:80\>  
DocumentRoot /home/users/kato/domains/pastebin/public\_html  
ServerName [pastebin.zentrack.net](http://pastebin.zentrack.net)  
\<Directory "/home/users/kato/domains/pastebin"\>  
Options Indexes FollowSymLinks  
AllowOverride None  
Order allow,deny  
Allow from all  
\</Directory\>  
\</VirtualHost\>  
[/code:1]

And I have been sure to restart httpd after each change.

---

<div class="post-metadata">

**Author:** ![kato](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/k/439d5e/32.png) [@kato](https://forum.virtualmin.com/u/kato)\
**Post date:** [August 1, 2008, 3:13pm UTC](https://forum.virtualmin.com/t/solved-creating-a-domain-with-webmin/30253/4 "2008-08-01T15:13:21Z")

</div>

**Joe wrote:**

In a virtual hosting configuration "\*" makes no sense.
Tee hee, I noticed that and corrected it (see my post just after yours). I was writing the reply at the same time you did : )

---

<div class="post-metadata">

**Author:** ![kato](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/k/439d5e/32.png) [@kato](https://forum.virtualmin.com/u/kato)\
**Post date:** [August 1, 2008, 3:23pm UTC](https://forum.virtualmin.com/t/solved-creating-a-domain-with-webmin/30253/5 "2008-08-01T15:23:53Z")

</div>

Oh right, I should probably note that it didn’t fix the problem.

---

<div class="post-metadata">

**Author:** ![Joe](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/joe/32/9_2.png) [@Joe](https://forum.virtualmin.com/u/Joe)\
**Post date:** [August 1, 2008, 3:25pm UTC](https://forum.virtualmin.com/t/solved-creating-a-domain-with-webmin/30253/6 "2008-08-01T15:25:27Z")

</div>

Do you have an index.html in the public\_html for that site (or any other index.\* that is recognized by Apache as an index page)?

---

<div class="post-metadata">

**Author:** ![kato](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/k/439d5e/32.png) [@kato](https://forum.virtualmin.com/u/kato)\
**Post date:** [August 1, 2008, 3:27pm UTC](https://forum.virtualmin.com/t/solved-creating-a-domain-with-webmin/30253/7 "2008-08-01T15:27:05Z")

</div>

An index.php, yes. I just tried an index.html too. But as the log post shows, it’s not even looking in the right docroot. ☹

---

<div class="post-metadata">

**Author:** ![kato](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/k/439d5e/32.png) [@kato](https://forum.virtualmin.com/u/kato)\
**Post date:** [August 1, 2008, 5:19pm UTC](https://forum.virtualmin.com/t/solved-creating-a-domain-with-webmin/30253/8 "2008-08-01T17:19:32Z")

</div>

Adding a DirectoryIndex declaration inside the \<VirtualHost\> directive fixed the problem for index.php and index.html.

---

<div class="post-metadata">

**Author:** ![kato](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/k/439d5e/32.png) [@kato](https://forum.virtualmin.com/u/kato)\
**Post date:** [August 1, 2008, 5:20pm UTC](https://forum.virtualmin.com/t/solved-creating-a-domain-with-webmin/30253/9 "2008-08-01T17:20:35Z")

</div>

It’s odd, though, that if the index file doesn’t exist, or apache can’t find it at least, I can’t access any files on that virtualhost (because it goes to the default server).

---

<div class="post-metadata">

**Author:** ![system](https://cdn.forum.virtualmin.com/uploads/default/original/2X/c/cd96d761e326db4b2bef94886a639109bd7a8e76.svg) [@system](https://forum.virtualmin.com/u/system)\
**Post date:** [April 30, 2020, 6:13am UTC](https://forum.virtualmin.com/t/solved-creating-a-domain-with-webmin/30253/10 "2020-04-30T06:13:16Z")

</div>

Closed on April 30, 2020, 6:13am UTC


