Archive for November, 2007

Goodbye VPSLink

November 29, 2007

Just canceled my plan with them. They are alright I have to say except that support was a bit slow or slower than I would have expected.

My OpenVZ server isn’t useful now as my slice at Slicehost is up and running and I think LAMP is my comfort zone. I have not managed to get LEMP running after all.

There are more optimization and tweaking I have to learn about Apache, MySQL and PHP so I’ll stay with my 256slice for the moment.

Apache isn't complaining now!

November 28, 2007

For the first time then I run apache2ctl configtest I have just Syntax OK and nothing else. I’m so happy.

The key is the site files in /etc/apache2/sites-enabled/, a typical one should look like this

#NameVirtualHost *
[VirtualHost *=""]
ServerName yoursite.com
ServerAlias *.yoursite.com
DocumentRoot /var/www/yoursite.com
[/VirtualHost]

of course with other directives as required.

I have also appended below line to /etc/hosts

my.own.ip.number mysite.com http://www.mysite.com and to file hostname this line mysite.com

After a apache2ctl graceful I have 82M used and 173M free from free -m. Further tweak was commenting out mpm_worker_module and use prefork MPM (multi-Processing Module) which is default for Linux and recommended if PHP is run as a module.

Sub.domain now I know

November 28, 2007

Eventually have my subdomains setup correctly last night. Subdomain using namebased virtualhost is like an ordinary domain therefore the key is setting the DNS records right.

Say you want to have these sites

mysite.net and *.mysite.net

habari.mysite.net running Habari at folder /var/www/habari

wp.mysite.net running WordPress at folder /var/www/wp

You’ll need DNS setup below (in the case of Slicehost)

mysite.net (name) my.own.ip.no (data) A (type)

mysite.net (name) ns3.slicehost.net (data) NS (type)

mysite.net (name) ns2..... (data) NS (type)

mysite.net (name) ns1..... (data) NS (type)

www (name) my.own.ip.no (data) A (type)

wp.mysite.net (name) mysite.net (data) CNAME (type)

habari.mysite.net (name) mysite.net (data) CNAME (type)

One other setup which may also be key is to add (create if it’s not there) below lines to this file /etc/apache2/conf.d/virtual.conf.

#

# enable multiple virtual hosts

#

NameVirtualHost *

Also the first line #NameVirtualHost * in all site config files stored under /etc/apache2/sites-available should also be commented out.

Last night I also have Shorewall installed, transferred content from this site using WXR export to that WP test site. During import found that I have chmod 777 . folder /wp-content/ such that the uploads folder can be created by the import script.

May be my apache or mysql aren’t properly optimized yet as I found out from stat at SliceManager that CPU was running flat out. I did a soft reboot and it’s now back to normal. free -m gave me 88M used out of 256 which is weird as I remember seeing a lot more consumed last night.

Webmin or not?

November 27, 2007

Webmin is a server admin package to make administration easy via web interface rather than command line. There are few howto available and I followed this one for 7.10 at my VPSLink server.

First off there are few perl modules required such as

apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl libmd5-perl

then I need to download the package from source

wget http://prdownloads.sourceforge.net/webadmin/webmin_1.370_all.deb.

Last run the install script dpkg -i webmin_1.370_all.deb. That will be it, simple, supposed to be.

I could then login by https://my.server.ip.no:10000/

Supposingly I don’t have to install *AMP stack before this as Webmin will install Apache for me. I tried that but it just didn’t finish.

At the end I did a apt-get -r to remove webmin and started over again. I guess it would be better if I have Apache2 installed first and let webmin to auto detect it.