Multi-Domains on Home Web Server - DNS issues?

[color=#0000FF]I’ve searched til I’m blue in the face, no luck with my specific problem.

Scenario:

Home Lan: Gagabit unmanaged switch, into which is plugged my Webserver, a couple NAS devices, a Laptop, Network printer, and Actiontec 701 DSL Modem/Router.

To avoid setting up a million Port Forwards, I put the webserver (192.168.1.200) in the DMZ zone for the Actiontec.

LAN subnet is: 192.168.1.x (currently using x=100-102 for devices, x=200-205 for webserver)

Default Gateway for all LAN devices, including webserver, is 192.168.1.1 and the webserver is using my IPS’s DNS servers as “Preferred” and “Alternate” DNS Server.

WAN IP on the Actiontec is my Dedicated IP Number.

I have only ONE dedicated IP number, but that shouldn’t be a problem.
I have changed my “real” Dedicated IP number in what follows, for security, to 12.34.56.78

At my registrar, I have private nameservers set to:

ns1.mydomain.us 12.34.56.78
ns2.mydomain.us 12.34.56.78

Both have been setup for a week.

All three Domains are using the private nameservers. I had to do it this way since Moniker won’t accept a “single” NS pointer, it requires 2. (But I can define the private nameservers to use the same IP. Go figure.)

(My desktop PC is normally plugged into the LAN, as well, but for my tests it’s using my other Internet service, isolated on a Comcast Cable Modem. Seperate ISP.)

I have 3 domains I want to host on the webserver (running CentOS 5.2):
mydomain.us, mydomain.org, and mydomain.net

I manually setup mydomain.us before installing VirtualMin.

DNS (CHROOOTED BIND9) is working, since I am able to use my desktop to go to http://www.mydomain.us (and see the webpage I setup in /usr/var/html/index.html), as well as access it for FTP (via ftp.mydomain.com) and SSH (via www.mydomain.com).

Contents of that DNS Zone file as follows.
**********************************************************[/color]

[code:1][color=#FF0000]
$ttl 38400
mydomain.us. IN SOA ns1.mydomain.us. admin.mydomain.us. (
1219107588
10800
3600
604800
38400 )
mydomain.us. IN NS ns1.mydomain.us.
mydomain.us. IN NS ns2.mydomain.us.
mydomain.us. IN A 12.34.56.78
localhost IN A 127.0.0.1
mydomain.us. IN MX 5 mydomain.us.
www.mydomain.us. IN CNAME mydomain.us.
mail.mydomain.us. IN CNAME mydomain.us.
ns1.mydomain.us. IN A 12.34.56.78
ns2.mydomain.us. IN A 12.34.56.78
ftp.mydomain.us. IN A 12.34.56.78[/color][/code:1]


[color=#0000FF]
The above Domain resolves just fine.

I then setup virtual IP’s for use with virtual NICS:

(NOTE: SERVER NIC eth0 is set to 192.168.1.200)

eth0:1 set to 192.168.1.201
eth0:2 set to 192.168.1.202
eth0:3 set to 192.168.1.203
eth0:4 set to 192.168.1.204
eth0:5 set to 192.168.1.205

My problem is that the other two domains (mydomain.net and .org) simply won’t resolve. They time out.

I THINK I’ve set them up in Virtualmin as I should, but am not sure. I am still VERY new at this. But they both have Virtual Server entries in Apache, and Zones in BIND DNS. Here’s one of them, adjusted for security:
*********************************************************[/color]

[code:1][color=#FF0000]$ttl 38400
@ IN SOA ns1.mydomain.us. admin.mydomain.org. (
1219266602
10800
3600
604800
38400 )
@ IN NS ns1.mydomain.us.
mydomain.org. IN A 192.168.1.202
www.mydomain.org. IN A 192.168.1.202
ftp.mydomain.org. IN A 192.168.1.202
m.mydomain.org. IN A 192.168.1.202
localhost.mydomain.org. IN A 127.0.0.1
webmail.mydomain.org. IN A 192.168.1.202
admin.mydomainr.org. IN A 192.168.1.202
mail.mydomain.org. IN A 192.168.1.202
mydomain.org. IN MX 5 mail.mydomain.org.
mydomain.org. IN TXT "v=spf1 a mx a:mydomain.org ip4:192.168.1.200 ip4:192.168.1.202 ?all"[/color][/code:1]


[color=#0000FF]When I tried to manually set up the ORG and NET domains, without using VirtualMin, try as I might I couldn’t get them to point to seperate directories. They would only resolve to the same directory as the US extension (usr/var/www/html/index.html).

I admit I’m a noob, but this shouldn’t be THAT hard. What in the world am I doing wrong?

Thanks in advance.[/color]

As I don’t understand your problem from your description I will only quess what you can do for finding more about problem.

Which machine resolves right IP address. Is box on which you have installed virtualmin able to resolve domains you have setuped?

Log in virtualmin machine and type:

host mydomain.org
host mydomain.com

etc.

If you will receive IP address problem is somwhere else.

It may be in BIND settings.

Can you resolve any IP addres from your laptop for example?
Try:

dig mydomain.org $virtualminserverIP

You can find more.

But if I imagine this - you have LAN and switch connected to router from which you gets WAN connection. So you only have one IP address.
Does your modem forward all traffic to your virtualmin server? I mean DNS (port 53) and all other stuff like POP3 HTTP etc.?

I would be happy if I can help you more - so if you will not be able to find problem and solve it, please write more about it and I will try to help you out.

[color=#FF0000]Thank you, rawww.

I’ve done some more experimenting, and my setup above is no longer completely accurate.

But first, host mydomain.xxx returns the same info for all three domains:

[root@server named]# host mydomain.us
mydomain.us has address 12.34.56.78

[root@server named]# host mydomain.org
mydomain.org has address 12.34.56.78

[root@server named]# host mydomain.net
mydomain.net has address 12.34.56.78

12.34.56.78 is my Dedicated IP Number.

And the results of DIG, with mydomain.us substituted for my real Domain’s .us name, and 12.34.56.78 substituted for my real Dedicated IP Number:
[/color]

[code:1][color=#008000]
[root@server named]# dig mydomain.us $12.34.56.78
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4129
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2

;; QUESTION SECTION:
;mydomain.us. IN A

;; ANSWER SECTION:
mydomain.us. 38400 IN A 12.34.56.78

;; AUTHORITY SECTION:
mydomain.us. 38400 IN NS ns2.mydomain.us.
mydomain.us. 38400 IN NS ns1.mydomain.us.

;; ADDITIONAL SECTION:
ns1.mydomain.us. 38400 IN A 12.34.56.78
ns2.mydomain.us. 38400 IN A 12.34.56.78

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Thu Aug 21 10:30:22 2008
;; MSG SIZE rcvd: 117

; <<>> DiG 9.3.4-P1 <<>> mydomain.us 16.17.47.104
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40194
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 13, ADDITIONAL: 0

;; QUESTION SECTION:
;16.17.47.104. IN A

;; AUTHORITY SECTION:
. 518400 IN NS C.ROOT-SERVERS.NET.
. 518400 IN NS D.ROOT-SERVERS.NET.
. 518400 IN NS E.ROOT-SERVERS.NET.
. 518400 IN NS F.ROOT-SERVERS.NET.
. 518400 IN NS G.ROOT-SERVERS.NET.
. 518400 IN NS H.ROOT-SERVERS.NET.
. 518400 IN NS I.ROOT-SERVERS.NET.
. 518400 IN NS J.ROOT-SERVERS.NET.
. 518400 IN NS K.ROOT-SERVERS.NET.
. 518400 IN NS L.ROOT-SERVERS.NET.
. 518400 IN NS M.ROOT-SERVERS.NET.
. 518400 IN NS A.ROOT-SERVERS.NET.
. 518400 IN NS B.ROOT-SERVERS.NET.

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Thu Aug 21 10:30:22 2008
;; MSG SIZE rcvd: 241
[/color][/code:1]
[color=#FF0000]
And here’s DIG for mydomain.net (.org produced same result, adjusted for domain name)
[/color]

[code:1]
[color=#008000]
[root@server named]# dig mydomain.net $12.34.56.78
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 65293
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2

;; QUESTION SECTION:
;mydomain.net. IN A

;; ANSWER SECTION:
mydomain.net. 38400 IN A 12.34.56.78

;; AUTHORITY SECTION:
mydomain.net. 38400 IN NS ns1.mydomain.us.
mydomain.net. 38400 IN NS ns2.mydomain.us.

;; ADDITIONAL SECTION:
ns1.mydomain.us. 38400 IN A 12.34.56.78
ns2.mydomain.us. 38400 IN A 12.34.56.78

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Thu Aug 21 10:39:13 2008
;; MSG SIZE rcvd: 133

; <<>> DiG 9.3.4-P1 <<>> mydomain.net 16.17.47.104
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 21417
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 13, ADDITIONAL: 0

;; QUESTION SECTION:
;16.17.47.104. IN A

;; AUTHORITY SECTION:
. 518400 IN NS L.ROOT-SERVERS.NET.
. 518400 IN NS M.ROOT-SERVERS.NET.
. 518400 IN NS A.ROOT-SERVERS.NET.
. 518400 IN NS B.ROOT-SERVERS.NET.
. 518400 IN NS C.ROOT-SERVERS.NET.
. 518400 IN NS D.ROOT-SERVERS.NET.
. 518400 IN NS E.ROOT-SERVERS.NET.
. 518400 IN NS F.ROOT-SERVERS.NET.
. 518400 IN NS G.ROOT-SERVERS.NET.
. 518400 IN NS H.ROOT-SERVERS.NET.
. 518400 IN NS I.ROOT-SERVERS.NET.
. 518400 IN NS J.ROOT-SERVERS.NET.
. 518400 IN NS K.ROOT-SERVERS.NET.

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Thu Aug 21 10:39:13 2008
;; MSG SIZE rcvd: 241
[/color][/code:1]
[color=#FF0000]
Since I want to tackle one problem at a time, let’s pretend that the only devices on my LAN are the webserver and my printer.

From my Desktop, attached to my Cable Modem and NOT on the LAN. all three domains resolve as of this morning, but they are ALL resolving to the webpages in /var/www/html (at this point, that’s better than I was doing yesterday) even though I have a virtual server defined for the .us Domain. I will wait to define Virtual Servers for the .org and .net extensions until I get the .us extension resolving to the right directory. Once I get that working, I’m certain I can get the other two to work.

I’m also certain that I have something misconfigured in that .us virtual server, however, or it WOULD point to /home/(username)/public_html. And maybe solving that ONE problem will let me correctly define the other two I’ll need?

Yes, the server is plugged into the switch, and the switch plugged into the router/modem. I have only one dedicated IP number: 12.34.56.78, on the WAN side of the router. The internal network is 192.168.1.x. The server NIC is set to 192.168.1.200, with default gateway 192.168.1.1, and primary/secondary DNS set to my DSL provider’s main DNS servers at 12.34.x.x

For now, THE SERVER IS IN THE DMZ for the Router, so no port forwarding is necessary. Every request from the WAN side gets to the server, except for port 9100 which I have defined to forward to my printer on 192.168.1.102. (Printing from the webserver works fine, as does printing from my laptop, so I’m pretty THAT part is set right.)

So, right as I write this…

I have 3 Master Zones defined in BIND. The .us Zone is identical to the first code box in my original post above.

The .net and .org are identical to the .us Zone (adjusted for Domain Name), but do NOT contain the two A records that start with ns1. and ns2.mydomain.us.

NOTE: When I first setup the server, I named it server.mydomain.us and this is the name it wants to use in the very first A record following the SOA. I simply change the "server" to "ns1" throughout the Zone Record, and it works fine.

There’s some “connection” between the DNS Zone Records and the Virtual Server(s) that I’m just NOT understanding. Until I get this straight, I’m not using Virtualmin but rather am using Webmin so I can see the records simply and directly. The Mail Servers that will need to be setup are something I will tackle later, too. But for now, I just want to get all three domains resolving and pointing to their “correct” directories under /home/(username)/public_html.

And thanks again for your help so far. I appreciate it.
[/color]

Sorry, I DO NOT understand why I’m double-posting. I am definitely pushing submit only ONCE.

Also note that the code box for mydomain.net has an error in it that I made.

Anywhere it says 16.17.47.104 that should be 12.34.56.78 and I’d appreciate it if you’d edit it to mask off that IP number. It’s too close to my real number for comfort. Thank you.

Also, I don’t know if this helps, but at the bottom of my /etc/httpd/conf/httpd.conf file is this entry for the Virtual Server I manually created:

[code:1]
<VirtualHost 12.34.56.78>
DocumentRoot /home/(xxxx)/public_html
ServerName mydomain.us
<Directory "/home/(xxxx)/public_html">
allow from all
Options Indexes
</Directory>
HostNameLookups on
UseCanonicalName off
Options Indexes
</VirtualHost>
[/code:1]

(xxxx) is the actual username for the directory.

under webmin-network configuration
you need the eth0 to point to your hostname, i.e. “server.mydomain.us
then you need to create 2 virtual interfaces on the eth0, i.e.
eth0:1 (for the ns1 IP)
eth0:2 (for the ns2 IP) even if they’re all the same IP’s
and check the “Host Addresses” add the hostname and both ns records.

then in virtualmin-system settings-module config you need to add your wan as in one of your zones the internal IP is visible which is incorrect. "Default IP address for DNS records"

Apache will have the internal IP to run on but the zone files need the external IP. I wouldn’t use chname btw but just the IP.

in the BIND module you can set the nameserver to what you want it to be.
Click on zone defaults and under "Default nameserver for master domains" use the ns1.domain.us

For the 3 domains you want to host, they’ll need to be created by virtualmin so they will be under the /home directory.

when all settings above are correct you could even delete the domains and recreate them new.

also <VirtualHost 12.34.56.78> would normally be <VirtualHost 12.34.56.78:80>
as you tell Apache what port to listen to

Thank you for the help, Ronald, I appreciate it.

I’ve printed out your replies and will try to make sense of what you suggest.

Note: my FIRST post is incorrect. Ignore all Zone Records contained within it. I’ve changed things.

My FOLLOWING posts, after rawww’s answer, have the correct info, and none of them have the Internal IP number showing, as you thought.

Keep in mind that, until I get the basics straight, I’m only using Webmin to make any changes, and not Virtualmin. Once it’s running correctly WITHOUT Virtualmin, I’ll start using that. And maybe this whole post belongs in the Webmin section, but I did start by trying to use Virtualmin and will want to do so once it’s working right. I’ll leave that up to the Moderators.

Anyway, I’m already confused by your first instruction to change the ETHx IP’s (including eth0 ??) to the External IP number (ns1 and ns2), though, since the webserver still sits ON the Internal LAN. (eth0 does point to server.mydomain.us already.)

Perhaps I’m completely misunderstanding what you mean, though?

Even though I put it into the DMZ, it’s still using the LAN subnet (192.168.1.200) and communicates to the “outside world” ONLY via the Default Gateway (192.168.1.1). It also communicates to my printer via 192.168.1.102:9100, and if I change it then that wouldn’t work either.

Let me give you my exact setup as it sits now.

For eth0:
Webmin -> Network Configuration -> Network Interfaces -> eth0 ->
IP Address: 192.168.1.200
Netmask: 255.255.255.0
Broadcast: 192.168.1.255
(MTU, Status, MAC Address): irrelevant

(If I set 192.168.1.200 to 12.34.56.78 (my dedi IP) I don’t see how that could possibly still work.)

Webmin -> Network Configuration -> Hostname And DNS Client ->
Hostname: server.mydomain.us
Resolution Order: Hosts DNS
DNS Servers: 127.0.0.1 , 12.34.xx.xx , 12.34.xx.x(x+1) <- my ISP’s DNS Servers
Search Domains: mydomain.us

Note also, that all my NS’s are the same IP number, since I only have one to begin with (12.34.56.78)

When you say:
eth0:1 (for the ns1 IP)
eth0:2 (for the ns2 IP)

Does that means set them to the external IP?
(ns1 and ns2 are set at my registrar, and in my Zones, to point to my single dedicated IP.) If I do, won’t I have the same problem as I would if I change eth0 to the external IP? I can’t see how that would work since, again, the webserver is sitting on the 192.168.1.x subnet.

At the moment, all three Domains DO resolve to my webserver, but even though I setup one Virtual Server (mydomain.us) in Apache to use /home/(username)/public_html it still insists on going to /var/www/html to retrieve the pages.

And the other two do as well, but that makes sense since there’s no Virtual Server entries for them yet, and they are defaulting to the Default Virtual Server which is defined to /var/www/html.

Sorry if these are such noob questions. I’ve been a network engineer for many years, but exclusively on LAN’s where we only had one subnet. And from what I learned all devices on a LAN, real or Virtual, must use the same subnet, and “leave” the subnet only via a Gateway (or a Bridge).

Thanks in adnvance.

as for the eth0 etc. they look fine.
sorry for the confusion, my error was I was looking/explaining from my own production server’s view, which has no router (my internal and external are the same)

so you can skip that part however you must put your WAN IP in the module config as posted above. This is necessary for the DNS records. So far you did this manually in the zonefiles, the intention is that VM will do this for you, yes?

Further, assuming there are no bugs, virtualmin module is meant to create, maintain, change, and delete domains on your system, not webmin.

Once it's running correctly WITHOUT Virtualmin,
that sounds like the wrong approach, imo. Virtualmin, again assuming there are no bugs, will create all the correct entries for your domains, postfix, dns etc.

Did you go to Virtualmin-system settings-recheck config? and gives it errors?

Thanks again, Ronald.

OK, I’ll defer to your recommendations on using Virtualmin. If I get it to work, I can always view the underlying configuration through Webmin and see what’s been done. So, let’s go over the Basics to make sure I have everything set correctly.

First, in Network Configuration -> Network Interfaces, I have:

eth0 at 192.168.1.200, Netmask 255.255.255.0
eth0:0 at 192.168.1.201, Netmask 255.255.255.0
eth0:1 at 192.168.1.202, Netmask 255.255.255.0
eth0:2 at 192.168.1.203, Netmask 255.255.255.0

Next, in Network Configuration -> Hostname and DNS Client, I have:

hostname: server.mydomain.us
resolution order: Hosts DNS
“Update hostname in host addresses if changed?”: is checked.
DNS Servers: 127.0.0.1 12.34.56.121 12.34.56.122 <- last two are my ISP’s DNS servers
Search Domain: “Listed” -> mydomain.us

Next, I just re-ran the VM check. It passed all tests. The following 2 lines are the only ones that gave any info which looks "adjustable":

"Using network interface eth0 for virtual IPs."

"Default IP address for virtual servers is 192.168.1.200."

Next, in the VM Config section: "Default IP address for DNS records" is set to my WAN IP (12.34.56.78).

Next, at the moment I have NO Virtual Servers beside the three default ones that all point to /var/www/html.

Next, I have three Zones defined, one each for my Domains.

The .US Zone has the two nameserver definition entries:

ns1.mydomain.com IN A 12.34.56.78
ns2.mydomain.com IN A 12.34.56.78

The .NET and .ORG Zones do not have those two lines, but each entry in all three, that needs to refer to mydomain.us, does. i.e:

mydomain.net. IN SOA ns1.mydomain.us. admin.mydomain.net.
mydomain.net. IN NS ns1.mydomain.us.
mydomain.net. IN NS ns2.mydomain.us.
mydomain.net. IN A 12.34.56.78

All three Zones use 12.34.56.78 for all entries that use an IP number directly.

All three Domains resolve as of this morning, but again, all are being fed the pages in /var/www/html.

(I do know that I’ll have to delete those Zones at some point, or Virtualmin won’t let me define Virtual Servers that use those Domain Names.)

With all that said, I’d appreciate ANYONE telling me what I’m doing wrong. When I played with Virtual Servers using Webmin, I could get one defined that LOOKED like it should work, but got the webserver error that “I didn’t have permission to access / on this server.” (This was actually an improvement: At least it was trying SOME different path to retrieve index.html.)

Thanks in advance!

it looks okay although in your case I’m not sure why you would use virtual interfaces.
Apache would have all domains created by virtualmin on the 192.168.1.200 shared IP

is your apache from the virtualmin repo? it would be compiled with suexec pointing to the /home directory as where the "centos apache" is not.

and you are using the GPL version I assume and installed it as a module?

Per haps Eric or Joe can chime in here as well.

Again thanks, Ronald.

The only reason I setup the 3 Virtual Interfaces is because the Webmin docs hinted at doing so, and the tutorial I’m using (Perfect Server Setup CentOS 5.2 or similar) suggested doing so in order to put each Domain on a seperate IP Number. If I have to delete them I can, no problem.

Yes, my system is the CentOS 5.2 install as suggested in the Tutorial. And yes, suexec is compiled with /var/www as the AP_DOC_ROOT. suexec -V returns that info.

I’m grateful for any help anyone can give me. Since all three Domains DO resolve and point to the default Apache webpage, I know I have at least SOMETHING set right. :wink:

It’s far easier to get up and running using our automated install script found on the download page (http://www.virtualmin.com/download.html). While the HOWTOForge article is cool, and I’m happy to see folks tackling different ways of using Virtualmin, it’s definitely not a good way for newbies to get started with Virtualmin for the first time. These are complicated problems with complicated solutions…and installation and configuration can be very intimidating. So, I wrote a big hairy scary script to do all of that for you. :wink:

Now that I’ve read through a bit more of this thread (long thread is loooooong! I’m still not really caught up), I’m seeing a trend: You’re trying to do all of Virtualmins job yourself, and having a hard time getting it all right. Stop trying to do everything yourself…if you want to do that, you don’t need Virtualmin butting in!

Virtualmin is perfectly happy to setup your interfaces for you–you just need the one primary interface to start with.

Virtualmin is perfectly happy to manage all of your Postfix virtual maps, your Apache VirtualHosts, your BIND zones, etc.

On this note:

The only reason I setup the 3 Virtual Interfaces is because the Webmin docs hinted at doing so, and the tutorial I'm using (Perfect Server Setup CentOS 5.2 or similar) suggested doing so in order to put each Domain on a seperate IP Number. If I have to delete them I can, no problem.

While I haven’t read this tutorial in full, this sounds like bad advice. There is no reason (good or otherwise) for putting non-SSL VirtualHosts on separate IP addresses. Let Virtualmin manage your interfaces. If you have multiple IPs and will be using SSL hosts on more than one of them, you’ll need to let Virtualmin know about the additional available IPs in the Module Configuration. Otherwise, put everything on one IP and forget that IP addresses exist at all.

Thanks for the suggestions, Joe.

I downloaded the install script. But as much mucking around as I’ve done so far, would it be better to just reformat the beast and start fresh?

And if so, what programs should I install from the CentOS DVD that I used so far (for god-knows how many reformats), in order to get me to the point that your install script would "take over"?

And yes, I AM trying to do many of Virtualmin’s tasks, simply because I want to learn how to do it. My skills for Network Engineering are becoming obsolete, since years ago I decided to specialize in Novell (ok, stop laughing you all), and we all know where Novell went.

And no, I don’t have multiple Public IP’s, I only have the one: 12.34.56.78.

Since the webserver is sitting on my Home LAN, though, I could take advantage of nearly unlimited IP’s on it if I need to. I set the webserver’s one interface to 192.168.1.200 on the LAN, and can’t imagine I’ll ever get near 192.168.1.254.

Anyway, where do I go from here?

Your help is appreciated. Thank you.

if it’s no problem to do a fresh OS install then by all means go ahead (i did at least 18 times in my trial and errors when i first started out).
What i did in the end is install centos on a really bare server minimum and let the install script do the rest.

the script installed the Apache, mysql and the rest as I skipped those from the centos installation. Once it was done, I got everything working straight away and could then finetune the virtualmin settings.

I think this was the best approach as until now I have had no serious problems.

suexec is compiled with /var/www as the AP_DOC_ROOT. suexec -V returns that info
that's wrong.

it should be

[root@sv01 ~]# suexec -V
-D AP_DOC_ROOT="/home"
-D AP_GID_MIN=100
-D AP_HTTPD_USER="apache"
-D AP_LOG_EXEC="/var/log/httpd/suexec.log"
-D AP_SAFE_PATH="/usr/local/bin:/usr/bin:/bin"
-D AP_UID_MIN=500
-D AP_USERDIR_SUFFIX="public_html"

let virtualmin install script install apache

A fresh install is no problem. God knows I’ve done it enough already. One more won’t matter. :wink:

I’ll take your suggestion and go from here, sometime today I think.

Thanks again!

OK, did as suggested. Let the install script install everything, after a bare-bones CentOS install. I made sure "Web Server" was NOT selected, so the installer would install the right Apache itself.

Named the server “server.mydomain.us”, set the NIC to 192.168.1.200/255.255.255.0 which is correct for my LAN. Default Gateway of 192.168.1.1 and DNS Servers xx.xx.3.121 and xx.xx.3.122 (My ISP’s DNS Servers).

Didn’t create any virtual interfaces.

In Virtualmin -> System Settings-> Module Config, I changed "Default IP Address for DNS Records" to my Public IP (12.34.56.78, not 192.168.1.200).

And it worked, as far as actually installing everything.

But once I created the first Virtual Server with Virtualmin, it still insists on resolving to /var/www/html for the Domains, even though in that server’s settings, it’s set to point to /home/(username)/public_html.

I can fire up www.mydomain.us and it’s found right away, but shows me the index.html in /var/www/html. (mydomain.org and .net aren’t resolving yet, and probably won’t until sometime tomorrow.)

I’m stumped. This is the same result I got when creating everything manually.

Anyone got any bright ideas? I’m all ears.