Virtual Hosts

Every now and then I come across a stupidly annoying problem with my website and it’s configuration before I can move on. This time it’s virtual hosts. Apache has the ability to allow you to host mobile domain names from the same directory and web server using the virtual hosts configuration.

 

I’m currently at this stage. I own more than one domain name and it’s annoying me.

I’m currently experiencing two problems with the domain

  • Apache not “serving” the index page for the virtual host directory. All it is serving is blank pages.

Initially I thought this was a permission problem. I later identified it and remembered it was the cause of problem#2 which is why I gave up in the first place. For reference, in the httpd.conf file there is a section called Include conf/extra/httpd-vhosts.conf this must be enabled (remove #) otherwise it won’t load the files

  • Apache now serves the home pages and finds them, but ignores the main /www root of the web server and goes straight to the virtual host directory

This is the current problem I’m encountering. Once I work out the virtual hosts configuration issue, I will post an update for future reference if I need to go back to it. Or help someone else out

I did a quick google search and find this post. Free link.

http://blog-rat.blogspot.co.uk/2009/05/apache-ignores-documentroot-in.html

 

I’m currently researching it

Views – 1081

Cannot start session without errors in phpMyAdmin

A quick one, I recently received the message Cannot start session without errors in phpMyAdmin when trying to logon

 

Usually when you get this message it’s normally because of your browse cache, or an issue with the session.save_path variable in the PHP.ini configuration file

 

I decided to check the session save path first and it turned out after I had a problem with my PHP configuration. I updated PHP but forgot to copy over the directories

 

My PHP was pointing to a /tmp folder. Once I created this, jobs a good un. Remember this in next time

Views – 1284

Added another computer for the clustered web hosting mix

Recently decided to upgrade the computers because I’m working on a Windows based clustered web hosting solution. I want to speed up the response times of my website, whilst also at the same time developing knowledge on virtual machines, clustered hosting and high availability environments that features SANS and load balancing

 

I purchased an old AM3+ motherboard from eBay a while back to replace my failed burnt out motherboard (AM2 based, my fault guvnor, oc’d it and fried). Anyway, as the new motherboard using a different CPU socket I had to purchase a new CPU and RAM.

 

Long story short, I was paid from Google for my youtube videos and had a small amount of money spare, so thought why not.

 

I present to you DIMPLES! {IT’S TINY SO I MIGHT CALL IT TITCH}

Specs – 2GB of DDR3, Dual Core Athlon CPU @ 2.8GHz

It’s not major, but perfectly suitable for clustered web hosting because it’s mainly for the features. I’ll maybe add in a secondary network card so I can look into load balancingPC-Dimples

Views – 918

What can a computer handle?

With me hosting my own website and files, I’ve been asking a lot lately from my tiny old home PC.It’s custom configuration of Windows 7 Home Premium, 4GB Ram, Quad Core AMD CPU and a Western Digital Raptor Hard Drive. This got me thinking enough to ask the question, how much is too much. What can a computer handle exactly?

Currently this PC is running at 90% memory usage, and 100% CPU usage. So it’s safely close to maximum and probably swapping to the page file a lot at the moment

 

On this PC at the moment I’m doing the following

  • Running Google Chrome and Firefox (surfing web, website testing)
  • Playing youtube
  • Running a virtual machine for development (Windows 7)
  • Running a webserver (Apache, MySQL, PHP)
  • Running a backup software
  • Listening to windows media player
  • Running an exchange server
  • Recording a cctv feed
  • Running all background and host apps (antivirus etc)
  • Folding on all CPU cores with SMP client (folding at home) – 100%

So this little beasty is doing well to be honest. I can’t wait for the new build. How much is too much, enough until your PC calls quits. I’ll reward it with some increased hardware and being a controller of my newly built cluster when I make it

It’s safe to say computers have advanced so far you can easily run virtual machines with the simplest of hardware now and still chuck more at the computer

 

 

Views – 855

Getting awstats to generate reports

I’ve managed to go that one step further with getting awstats to generate reports and finally have it recording information.

The way awstats works is it generates all the file information from a local database, which stores all the records for your website. You have to run the command

perl awstats.pl -config=mysite -update each day so that your files are dragged in from the access_log in your log files directory and added to the database

You can then compile your reports using the -output -buildstaticlinks command

I’ve create a more documented guide for this on my website for people who need to understand the configuration and setup further and are having a little trouble with awstats on their website.

Views – 1920

Improving Apache performance

I’m currently looking at improving apache performance of my webserver. One of the things I’m doing is trimming down the code. This serves two purposes

First it’s more aesthetically pleasing for me to look at and less rubbish to sift through when troubleshooting

Secondly, there’s less code for apache to sift through. I could just comment all the lines but it would be a bit messy so I’m working on developing a shortened apache document that’s easier to read and understand for me

Views – 896

Improving web server performance

One thing which has griped me about my website, even though I use Apache and Microsoft Windows as my servers is that I’ve always wanted to look into Improving web server performance.

Currently my page load times are around 2 – 3 seconds when tested around the world but I’m always up for making it that little bit faster.

Currently I’m looking at multiple methodologies
– Upgrading the HDD to SSD at a later date
– Implementing RAMDisk Caching for the Website
– Pruning the httpd.conf file so theres less crap in it (mainly for me)
– Implementing zip compression of pages
– Implementing disk caching of statically served files
– Optimise the CSS code and layout of the website for mobile browsers and tablets

This should all help speed up the site and make it more optimised for multiple web formats.
Currently this is ongoing and I’m monitoring the sites and errors to find out if there’s any problems

Currently my site gets a speed of 87/100 on google developer pagespeed and 57/100 on pingdomtools.

I’ve also tested my website for further development on woorank.com and it gets a score of around 57.

I’m aiming to get these close to 100 as possible for maximum performance

Views – 901