Shared Web Hosting
Shared Web Hosting gives you -the user- some space on a shared computer where 100, or 200 other web sites are also running on. This is an excellent choice for small, static web sites with few thousand users a day.
Which operating system should I pick?
Web Hosts typically offer Linux and Windows options. For most purposes, Linux is sufficient. One detail is that, Linux is case sensitive with regard to file names. Some Windows based (Microsoft) web editing tools may generate HTML that is not accurate when it comes to case sensitivity. If you create your website on Windows, your links that work on Windows may not work on Linux.
How do i place my files to the webserver?
You will typically be able to send your files to the webserver using ftp (file transfer protocol). On a Windows File Exlorer, you can type: ftp://username@yourwebsite.com and you should be able to access your website via FTP. There are other FTP clients you can use too. Some web design software, such as NetObjects Fusion www.netobjects.com
has built in support for FTP as well.
Can I use a database?
Most web hosting companies offer mysql database. You can typically have few hundred megabytes of data. If you have excessive needs, they may not allow that. Some companies limit the CPU that your account can use on mysql, or some others limit the disk space. You may want to access your database from other locations such as home, office and some hosting companies block such access which may reduce the usability of the database.
Can I use Java, or PHP, or .NET?
PHP is the most popular option. That is because it is easier and safer for the web host to maintain PHP based sites. Java and .NET require more responsibility and knowledge on the web site owner. Since we all pay just $5 a month, we often cause memory leaks or excessive resource use when we use Java or .NET. Therefore, Java, .NET solutions are typically more expensive than PHP. They may actually be not as robust as PHP because very often, other mistakes that another website makes on the same server brings down the whole server. So, if you can, just stick to PHP.
Can I configure PHP settings for my website?
Some webhosts allow configuring PHP settings using .htaccess file, or a php.ini file inside your website directories. For example these could be the include_path, or magic quotes, or register_globals. Keep in mind, syntax in .htaccess can be different than php.ini syntax.
Can I use URL Rewrite?
URL re-writing is an advanced technique used for various reasons. One typical reason is to make dynamic URLs look more static to make search engine robots think they are static resources.
This kind of url rewriting can be done inside .htaccess if you are using Apache Web Server, typcially on Linux.
Example:
User sees:
http://www.mywebsite.com/posters/artists
Internally, in our .htaccess we have:
RewriteEngine On RewriteRule ^posters/(.*)$ index.php?category=$1
So that our PHP scripts work as if it was:
http://www.mywebsite.com/index.php?category=artists
How can I reduce HTTP requests?
On a web page, every image that you have, needs to be fetched by the browser with a separate HTTP request. If you have many visitors, or if creating this content is expensive (alot of computation / database lookup in PHP?) you can reduce this work by telling the browser it can cache these artifacts.
If you have fairly static content such as images, or static html pages, or if your database driven website does not change often, you can place something like the following in your .htaccess file:
ExpiresActive On ExpiresDefault "access plus 300 seconds" ExpiresByType text/html "access plus 1 day" ExpiresByType text/css "access plus 1 day" ExpiresByType text/javascript "access plus 1 day" ExpiresByType image/gif "access plus 1 month" ExpiresByType image/jpg "access plus 1 month" ExpiresByType image/png "access plus 1 month"
Can I use SSH ?
Some Shared Hosting providers provide SSH capability, either for free or for extra pay. Some do not allow it at all.
SSH (Secure Shell) is a way to connect to your webserver to be able to execute some command on the command line. It can become helpful when you can FTP files as a zip file and quickly unzip them on the server with an unzip command, or use mysql commands to load data into your database instead of slowly inserting them over the internet via connecting to your database from home or office.
Be careful not to delete your own files by mistake.
Can I use Remote Desktop for Windows?
No. That would be too expensive in terms of server resources on a shared host. But you can use Remote Desktop with some VPS and dedicated server plans.
Can I use WebServices ?
Yes (*). There are different PHP libraries. Some of them require certain PHP extensions (native DLLs, shared objects) to be on the server. You can’t install them yourself. But you can always fallback to a ‘PHP only library -no native DLL’ and FTP it to the server yourself if your PHP configuration on the server does not have an alternative.
*Some hosting companies block outbound ports such that your scripts cannot access other webservices. You need to find a host that allows this if you want to use webservices. Some hosts require that you get static IP before they enable your outbound ports.
Hidden Limits of Shared Web Hosting
Shared Web Hosting companies often advertise unbelievable amounts of disk storage (300GB?), and bandwidth (unlimited?). However, when you actually start using such amount of content, you will hit many road blocks and your account can often be suspended and eventually terminated, whatever you paid forfeited. Excessive promises are just a bait, you should not believe them blindly. What kind of hard disk is it that 200 websites are on the same machine and each of them is promised 300GB disk space?
Following are the other limits that a web host can apply even though they may not tell you ahead of time:
1. Excessive CPU use on WebServer. For example, on average, your PHP scripts may be expected to use no more than 1% of the total CPU. If you serve gigabytes of pages, you will easily exceed this limit. Thus you can have 300GB of content, but you can’t serve it to anybody easily. Some web hosts will suspend your account until you complain about it. Some of them just block it for few minutes and after that it will be back online again.
2. Excessive CPU use on the MySQL Server. For example, on average, your account may be expected to use no more than 0.3% of the CPU by mysql. If you have alot of data, and you query it often, MySQL has to do alot of work. On top of it, if you do not have correct database indexes or complicated queries, it may cause MySQL to use excessive CPU. That will slow down the whole server, it’s a no-no. They will lock your account.
3. Excessive disk space use for MySQL. Most webhosts do not mention any space limit for your databases. However, if you use 4-5 Gigabyte, they start yelling out loud that you are over the limit. Suddenly, out of the blue, this new limit appears and they will lock your account again.
4. bandwidth - if you have alot of content, and somehow you manage to serve it (without hitting above limits) to many people coming to your website, you will eventually hit a bandwith limit.
5. Some webhosts may throttle (make slow) the FTP access such that you cannot possibly copy and maintain the promised Gigabytes of content in the first place.
VPS (Virtual Private Server) Solutions
When you hit the hidden limits of Shared Web Hosting, your provider will try to get you to a VPS solution or a dedicated one. Even if you are using 3-4GB, they will say you have out grown shared hosting, you need to upgrade. Makes one wonder where did that 100GB space promise go.
Anyway, a Virtual Private Server is a Virtual Machine Software that runs inside the host operating system such to create a fake environment where another operating system can run. A Host can have tens or hundreds of Virtual Machines running in it. Inside each Virtual Machine there will be another Linux, or Windows running. Each of these Virtual Machines will have access to a subset of the Host’s resources in terms of diskspace, memory and or CPU.
Cheapest options start something like 16MB memory, 100MB diskspace, for lets say $5. The truth is you cannot do much with that. If you want to use Java, you need couple hundred MB to start with. Even then there may be problems, don’t count on it until you get your JVM working.
You can get a decent 512MB memory, 10GB diskspace for maybe $30/month nowadays.
Some Windows options allow you to connect using Remote Desktop. Once you have that much resources, get ready to ship out $100 a month.
These VPS systems allow you to connect to your virtual machine using a root account via SSH (command line). Once you are root, you can do whatever you want. So you have much more freedom compared to an Shared Hosting solution. However, you may have problems if your database or the webserver crashes. Also, configuring the details may take longer time.
Dedicated Servers
A dedicated server is a computer that is totally your to use. It is hooked up to a high speed internet connection. So you are pretty much paying for the connectivity.
There are managed and unmanaged dedicated servers. Managed ones are expensive, couple hundred to thousands of dollars. But if something goes wrong, there is someone to press the button and reboot.
Unmanaged servers can be as cheap as $50. But this is for people who have time to configure, and maintain, and monitor it. Who is there to reboot if it blows up 3AM your time?
To work with VPS or Dedicated Servers you have to learn all the tricks to get things running in an efficient way.
If it’s Windows, you can use Remote Desktop to connect to your remote computer for admin tasks.
If you are a pro and have a major website that needs high performance, then a dedicated server might be for you.
|