Welcome, Guest
Please Login or Register.
Lost Password?
Re:creating a domain with webmin? (1 viewing)
Post Reply

TOPIC: Re:creating a domain with webmin?

#15321
kato (User)
Posts: 115
graphgraph
[solved] creating a domain with webmin? 2008/08/01 10:07  
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:

<VirtualHost *> DocumentRoot /home/users/kato/domains/pastebin/public_html ServerName pastebin.zentrack.net <Directory "/home/users/kato/domains/pastebin/public_html">    Options +Indexes     Allow from all </Directory> </VirtualHost>



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:

[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



Anything else I need to set up to make this work?

Post edited by: kato, at: 2008/08/06 06:49
Operating system CentOS Linux 4.6
Webmin version 1.420
Virtualmin version 3.60 (Pro)
Kernel and CPU Linux 2.6.9-67.0.22.ELsmp on i686
  The administrator has disabled public write access.
#15322
Joe (Admin)
Posts: 3924
graph
Re:creating a domain with webmin? 2008/08/01 10:10  
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/
  The administrator has disabled public write access.
#15323
kato (User)
Posts: 115
graphgraph
Re:creating a domain with webmin? 2008/08/01 10:12  
I've also tried:
Code:

<VirtualHost 67.210.97.170:80> DocumentRoot /home/users/kato/domains/pastebin/public_html ServerName pastebin.zentrack.net <Directory "/home/users/kato/domains/pastebin">    Options Indexes FollowSymLinks     AllowOverride None     Order allow,deny     Allow from all </Directory> </VirtualHost>



And I have been sure to restart httpd after each change.
Operating system CentOS Linux 4.6
Webmin version 1.420
Virtualmin version 3.60 (Pro)
Kernel and CPU Linux 2.6.9-67.0.22.ELsmp on i686
  The administrator has disabled public write access.
#15324
kato (User)
Posts: 115
graphgraph
Re:creating a domain with webmin? 2008/08/01 10:13  
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 : )
Operating system CentOS Linux 4.6
Webmin version 1.420
Virtualmin version 3.60 (Pro)
Kernel and CPU Linux 2.6.9-67.0.22.ELsmp on i686
  The administrator has disabled public write access.
#15325
kato (User)
Posts: 115
graphgraph
Re:creating a domain with webmin? 2008/08/01 10:23  
Oh right, I should probably note that it didn't fix the problem.
Operating system CentOS Linux 4.6
Webmin version 1.420
Virtualmin version 3.60 (Pro)
Kernel and CPU Linux 2.6.9-67.0.22.ELsmp on i686
  The administrator has disabled public write access.
#15326
Joe (Admin)
Posts: 3924
graph
Re:creating a domain with webmin? 2008/08/01 10:25  
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)?
  The administrator has disabled public write access.
#15327
kato (User)
Posts: 115
graphgraph
Re:creating a domain with webmin? 2008/08/01 10:27  
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. :(
Operating system CentOS Linux 4.6
Webmin version 1.420
Virtualmin version 3.60 (Pro)
Kernel and CPU Linux 2.6.9-67.0.22.ELsmp on i686
  The administrator has disabled public write access.
#15329
kato (User)
Posts: 115
graphgraph
Re:creating a domain with webmin? 2008/08/01 12:19  
Adding a DirectoryIndex declaration inside the <VirtualHost> directive fixed the problem for index.php and index.html.
Operating system CentOS Linux 4.6
Webmin version 1.420
Virtualmin version 3.60 (Pro)
Kernel and CPU Linux 2.6.9-67.0.22.ELsmp on i686
  The administrator has disabled public write access.
#15330
kato (User)
Posts: 115
graphgraph
Re:creating a domain with webmin? 2008/08/01 12:20  
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).
Operating system CentOS Linux 4.6
Webmin version 1.420
Virtualmin version 3.60 (Pro)
Kernel and CPU Linux 2.6.9-67.0.22.ELsmp on i686
  The administrator has disabled public write access.
Post Reply
get the latest posts directly to your desktop

Talk and Get Help

Support
Forums
Bugs and Issues

Get Virtualmin

OS Support
Buy Online
Download
Copyright 2005-2007 Virtualmin, Inc. All rights reserved.