Hi. Obviously because I’m posting in this category, I’m a complete newbie, so please accept my apologies if this question has a really obvious answer.
I’ve installed virtualmin on a machine that I run in my office for web development.
I followed a tutorial and all seemed well.
I changed www-data to reflect the new home directory (/home), but when I access the ip of the server it continues to point to var/www
What have I missed? I’ve restarted the machine to double check that I’d saved www-data and it all looks good to me.
I’ve also doubled checked that I’ve enabled suexec within webmin.
Any help would be really appreciated.
Hmm, what distribution/version are you using?
And how did you perform your Virtualmin installation, did you by chance use the install.sh script?
I’ve lately seen some “tutorials” which indeed perform the Virtualmin installation the manual way. Especially as a newbie, I highly recommend not following those, but using the installer script, like Eric mentioned. It will save you a lot of trouble and grey hair.
Morning. Thanks for your replies.
I followed a tutorial for a manual installation, and didn’t even realise that there was a install script until I start researching this problem.
Can I run the install script now that I’ve manually installed, or do I need to uninstall first?
This is the first time I’ve setup my own server, and I’m really exceited to get it working properly.
Thanks for your advice.
Hehe, I know how that feels.
To use the installer script, it is advised to do that only on a bare system, freshly installed, with only SSH as additional package. So if you can, you should reinstall the system.
Ok, so I’ve just performed a fresh install of Ubuntu and then ran the install script, but it failed.
I’ve attached the error log. Doesn’t make much sense to me.
Again, any help would be really appreciated.
Uh-oh, several unfortunate things in there.
It is suggested to only use the LTS versions of Ubuntu, since only those are fully supported (and will get updates for a sufficiently long period). Those are 8.04, 10.04 and 12.04.
Your system should have a fully qualified hostname, like “host.domain.tld”. To get that, you need to configure several files in /etc correctly. I can list those when required. You can test validity using the command
hostname which should reply with just a hostname, and
hostname -f and
hostname -A which should both reply with the identical FQDN (hostname plus domain). Example from my mail hosting VM:
root@australis:~# hostname -f
root@australis:~# hostname -A
You seem to be operating behind a NAT router, according to your 192.168.* address. Additional steps need to be done to get that up and running correctly. Namely several ports need to be forwarded (25, 80, 443, 110, 143, 995, 997, 21 and possibly others) and FTP needs special configuration.
The fatal error might indicate that the system could not retrieve package updates. Make sure the system can correctly reach the Internet and the Ubuntu package repositories.
Thanks for your reply. Sorry for opening two threads, just thought that I’d diverted off topic with this new problem.
To be honest, I thought installing virtualmin would be pretty straightforward using the install script.
This is a fresh install of ubuntu sever 12.04 with only openssh installed.
I don’t fully follow the purpose of having a hostname as this is only a local server, but I’ve checked and I have the same value for hostname, hostname -f, and hostname -A. How can I change this?
So I need to log in to my router to make those changes?
I can definitely access the internet fine through the server as I’ve just ran the updates.
Just wondering if I should bother with virtualmin or just stick to manually managing the server?
Virtualmin should work fine also behind a router at home. Though having an FQDN for your server would be very preferable, since it makes things much easier. To be honest, I have never used Vmin without an FQDN, and don’t know precisely what problem will arise where if you don’t have one.
To acquire one for your home server, all you need is an externally resolvable FQDN of the form “host.domain.tld”. You could use any number of free (dynamic) DNS providers for that, e.g. dyndns.org. You’ll need that - i.e. a static FQDN - anyway if you intend to receive email from the Internet.
On your server, the important files in /etc are “hosts”, “hostname” and “mailname”. If you set those correctly before running the script, all should be okay. Mine look like this:
root@australis:~# cat /etc/hostname
root@australis:~# cat /etc/hosts
126.96.36.199 australis.tianet.de australis
root@australis:~# cat /etc/mailname
Note that “hosts” contains more lines, I pasted only the relevant one. If you enter the hostname and domain part during Ubuntu installation, those things should be correct already. On your router you should not need to change anything.
Thanks for that information Locutus.
I’ve signed up for an account and I now have these as my hosts -
root@webtise:/# hostname -f
root@webtise:/# hostname -A
I then tried running /bin/sh install.sh and still had an error. I’ve attached the full readout in a text file
Okay, the hostname looks good now!
During installation, it would seem that the script, or rather the invoked apt-get command, cannot download several packages.
Before we go into this further: I can see that you’re still using Ubuntu 12.10. It is possible that there are some compatibility issues, since that version is not officially supported. It’s generally not recommended to use bleeding-edge versions of Linux distros for servers. Can’t say much more about this unfortunately, since I’m only using LTS versions.
Can you try Ubuntu 12.04? I’m using that version myself and know that it works okay.
This is a fresh install of ubuntu sever 12.04 with only openssh installed.
Just to add to what Locutus mentioned – although it may have been your intention to install Ubuntu 12.04, it really does look like you have Ubuntu 12.10 there. The Virtualmin installer outputs the Ubuntu version it sees, and your error message contains “Ubuntu 12.10” in the text.
My suggestion would be to try downloading the 12.04 install CD’s again, and then redo your install.
The Virtualmin installer should work great on Ubuntu 12.04.
Well it looked like I’d make the completely amateur site of installing the wrong version of Ubuntu. I’ve now installed 12.04 and virtualmin installed just great! Hoorah. Thanks for your help.
I’ve set up a virtual server now, just need to work out how to access it from the frontend. Thought it would be
but that doesn’t work, any ideas?
Yepp, thanks Eric, I forgot to mention that I spotted the 12.10 in the error log.
What do you mean with “access it from the frontend”? As in, log in to Virtualmin as the vserver owner? Or watch the vserver’s web contents?
If the former, you access Virtualmin like usual, at https://ip:10000 and enter the username and password of the vserver at the login. (Vmin uses Linux users for its login, and one of those gets created whenever you set up a virtual server.)
Sorry for the delay.
Ok, so for example, lets say I’ve set up a new virtual server in virtualmin, and called it “mydomain.com”.
From my local network, how can I preview this site?
This is probably a really stupid question, so apologies in advance.
Your Virtualmin will probably use your external IP in the DNS zone. So if you want to preview the website like a visitor from the outside would see it, you need to a) enter your Virtualmin server’s IP as nameserver into your local network PC’s network configuration, and b) make sure your router forwards connections to its external IP, also from the internal network, to the right LAN machine (this is call “NAT reflection”).
Otherwise, Virtualmin has a Preview function of its own, check the “Services” menu.
Also, rather than using IP addresses, I’d recommend setting up a domain name on your server.
You can do that for all your accounts with just one domain name… there’s details on setting that up here in the section titled "How do I make a users website available at “http://www.mydomain.tld/~username”: