Virtualmin setup

I hope that someone can please help me.

I am trying to setup a small webserver at home for some little projects, This is only one server and I have only one dynamic ip address. it is not possible to to get a static ip address.

The domain name is a old domain the-king-family.org.uk

i updated the domain to point to 2 dyndns addresses thekinghome1.dyndns.biz & thekinghome2.dyndns.biz

Installed ununtu 10.10 and installed virtualmin using the install.sh

created the virtual domain in virtualmin, but all the requests go to \var\www\ and not to the home\theking\ where it should go.

I have searched the internet and not found anything that can help.

do i need to add thekinghome1.dyndns.biz & thekinghome2.dyndns.biz to virtualmin or bind as nameserver if so how and where do i do it.

Hope someone can help.

Installed ununtu 10.10 and installed virtualmin using the install.sh

Well, the first issue is that Ubuntu 10.10 isn’t supported by the installer :slight_smile:

Virtualmin only supports the Ubuntu LTS releases, so 10.04 is the most recent supported version. It might work :slight_smile: But you may also run into some strange issues.

You can see the list of supported OS’s here:

http://www.virtualmin.com/os-support.html

That’s also mentioned when the installer initially runs :slight_smile:

created the virtual domain in virtualmin, but all the requests go to \var\www\ and not to the home\theking\ where it should go.

It may be a problem with the IP address listed in Apache. The following document has a section named “The wrong site shows up” – take a peek at that, and see if that resolves the problem you’re having:

http://www.virtualmin.com/documentation/web/troubleshooting

Thanks for your quick response, my error it is 10.04 TLS installed, 10.10 was one of the version i tried.

I have seen the document before, and have checked.

in configuration - Network Settings,
Default virtual server IP address = my external ip address
Default IP address for DNS records = Same as virtual server IP

in the document it does mention Network interface for virtual addresses
the server is on a LAN and in the Network Configuration - Network Interfaces the eth0 is set to my local ip address. eth0:1 is Ethernet (Virtualmin) with my external ip address.

I am really struggling working out whats not right.

Hmm, well, I suspect there’s some sort of IP address mixup that’s confusing Apache. Though, I’m not quite sure what at the moment :slight_smile:

What does your network setup look like – is your server behind a NAT router?

And then, the external IP address on your server, on device eth0:1, is an IP address on a private LAN?

If that’s the case, “Network interface for virtual addresses” would need to be eth0:1, and “Default IP address for DNS records” would be “Automatically detect external address”.

Also, you’d want to check the Virtual Host “/etc/apache2/sites-enabled/000-default”. If it contains this line at the top:

That could cause the problem you’re seeing – you should remove the “*”, replace it with your IP address, then restart Apache.

-Eric

Hi, thanks for your reply,

I am behind a router NAT router, the router forwards the ports to the webserver which is 192.168.0.34.

If it makes any sense i am on virgin media.

The device eth0:1 is a virtual, and is set to my external IP address but when i set this, i cant access the domain at all. so have removed it temporary, i had done this on reading the http://www.virtualmin.com/documentation/web/troubleshooting

i changed the <VirtualHost *:80> to <VirtualHost 81.??.??.102:80>, but when i did this i get HTTP 404 error for the domain, i have made sure there is a index.php file in the public_html folder for this domain.

Okay, it sounds like you don’t need eth0:1… if eth0 is set to 192.168.0.34, that’s perfect, just forward all your requests to it.

All your websites should be setup on eth0, using 192.168.0.34 as the IP address in Apache.

The public IP address should only be used for DNS.

-Eric

For testing purposes (that is to reduce complexity), I would put your box in the DMZ of your router (instead of forwarding), when everything I would configure the router etc.

Hi, fixed, changed the ip addresses to the local ip. and all working :slight_smile: thank you so so much for your help. been driving me mad.

Another hint: since your domain zones are - as I interpret your posts - served externally, you don’t even need to bother with “external/internal/auto-detect” IP addresses for setting up your BIND. All you need to do is set your Apache to use the LAN IP, then create a port forwarding in your router for port 80 to your LAN server IP, and that’s it. :slight_smile:

It only gets more complicated if you need to set up a different IP for your server in BIND (since that needs to serve your external IP) than in Apache (which has to use your internal one).