HTML, XHTML and CSS All-In-One for Dummies - Andy Harris [328]
♦ Customer support is excellent. Most free hosting services offer no customer support. Freehostia provides good support, even to the free services. (I asked a couple of questions before anyone there knew that I was writing this book, and I was impressed with the speed and reliability of the responses.)
Choose whichever hosting service works for you. If you find a free hosting service that you really like, upgrade to a paid service. Hosting is a reasonably cheap commodity, and a quality hosting service is well worth the investment.
Managing a Remote Site
Obviously, having a hosting service isn’t much fun if you don’t have pages there. Fortunately, there are a lot of ways to work with your new site.
Using Web-based file tools
Most of the time, your host has some sort of Control Panel that looks like the one shown in Figure 1-6.
Figure 1-6: This Control Panel allows you to manage your site remotely.
There’s usually some sort of file management tool that might look like the one shown in Figure 1-7.
Figure 1-7: This file management tool allows you to manipulate the files on your system.
In this particular case, all my Web files are in the www/aharrisbooks.net directory, so I click to see them. Figure 1-8 shows what you might see in an actual directory.
This page allows you to rename, upload, and edit existing files and change file permissions.
You can create or edit files with a simple integrated editor: build a new file with the Create File button. Type a filename into the text area and click the button. You can also click the edit button next to a file, and the file will open in the editor. In either case, the text editor shown in Figure 1-9 appears.
You can write an entire Web site using this type of editor, but the Web-based text editing isn’t helpful, and it’s kind of awkward. More often, you create your files on your own XAMPP system and upload them to the server when they’re basically complete. Use server-side editing features for quick fixes only.
Figure 1-8: Now, you can see some files here.
Figure 1-9: The hosting service has a limited text editor.
What’s with all the permissions?
Permissions are typically treated as binary numbers: 111 means “read, write, execute.” This (111 value) is also a 7 permission because 111 binary translates to 7 in base ten (or base eight, but let’s skip that detail for now).
A permission is read as three digits, each one a number indicating the permissions, so 644 permission means rw- r-- r--. This example can be translated as “The owner should be able to read and write this file. Everyone else can read it. Nobody can execute it.”
If you don’t understand this concept, don’t worry about it. The guidelines are very simple: Make sure that each of your files has 644 permission and that each directory has 755 permission. That’s all you really need to know.
Understanding file permissions
Most hosting services use Linux or Unix. These operating systems have a more sophisticated file permission mechanism than the Windows file system does. At some point, you may need to manipulate file permissions.
Essentially, the universe is divided into three populations: Yourself, your group, and everybody else. You can allow each group to have different kinds of permission for each file. Each of the permissions is a Boolean (true or false) value:
♦ Read permission: The file can be read. Typically, you want everybody to be able to read your files, or else you wouldn’t put them on the Web server.
♦ Write permission: The file can be written, changed, and deleted. Obviously, only you should have the ability to write to your files.
♦ Execute permission: Indicates that the file is an executable program or a directory that can be passed through. Normally, none of your files is considered executable, although all your directories are.
Using FTP to manage your site
Most of the work is done on a local machine and then sent to the server in a big batch. (That’s how I did everything