Setting Up a Website

And they asked him, “Are you the one who is to come, or shall we look for another?” And Jesus answered them, “Go and tell John what you hear and see: the blind receive their sight and the lame walk, lepers are cleansed and the deaf hear, and the dead are raised up, and the poor have good news preached to them. Blessed is the one who is not offended by me.”

Matt 11:3-6

I'm a teacher by vocation and gifting; I love to teach. By corollary, I love to learn. I'm curious about everything and I have a blast learning about almost anything. Over the years, I've picked up quite a bit of information through the Internet. This website is my simple attempt to pay back; to contribute to the community and try to make the interwebs a better place.

As such, I don't require registration. I don't want your personal information. I don't set cookies. I won't put up advertisements. If I mention a product or service, it's because I use it, benefit from it, and I think others would too. I don't need, or want, your money. I simply want to offer some information to other curious characters.

I'm writing this site as an experiment. It's all written in a text editor. I make my own graphics, write my own JavaScript, CSS, PHP, and HTML from scratch because I'm trying to learn more about how all these pieces fit together. I use TextWrangler because I think it's a great text editor and it does everything I want in a very simple and efficient way.

If you want to contact me, try FaceBook or Twitter.

February 19, 2012

As I state in the "about" box, this site is an experiment. It is as much for me to learn something as it is to share the things I've learned. From its inception my intent has been to publish a live site, but I needed to gain experience before going live, so I set up a local web server. This page details how I set up that server. If you want to set up your own experimental web server, read on. Your mileage may vary.

I use a mac so the web server is built in; it's only a matter of turning it on (system preferences/sharing/Web Sharing - check). That's all that is needed to have a place to experiment. I'm sure you can do the same thing on a Windows computer, but since switching in 2003 I haven't done much to keep up with the Windows OS so you'll need to do a little more googling.

I also wanted to experiment with PHP, which is a server side, web programming technology, so I needed to set up a PHP server as well. It turned out to be pretty easy to do that also. First, turn off the web server (system preferences/sharing/Web Sharing - uncheck), then open up terminal and edit the http daemon configuration file. Don't worry, it's only a matter of removing a hash (#) from the front of a line in the file. I used nano to edit the file so I didn't have to change permissions or move the file. Type this in the terminal:

sudo nano /private/etc/apache2/httpd.conf

Sudo is a command allowing you to temporarily do things as the super-user and requires that you type your password. After typing your user password, nano will open the httpd.conf for editing. There will be a screen full of commands and warnings about not messing with things you don't undertand. These warnings are important. Don't mess around with anything else in this file unless you know what you are doing, and you don't know what you're doing otherwise you wouldn't be reading this. Scan through the file and find a line that looks like this:

#LoadModule php5_module libexec/apache2/

Remove the hash at the front of the line. Save the file with control-o (^o) and then exit (^x). That's it! Switch on the web server and you will have a PHP-enabled web server running on your mac.

Ready to experiment? You will need, at the minimum, a file named "index.html" in your user web site folder (~/Sites --BTW, ~ is a shortcut to your user folder). If you don't have anything in ~/Sites, you can download webTemplate and extract it to your site folder. You can access your site by opening "localhost/~username" in your favorite web browser. Replace username with your short user name and don't type the quotes (e.g., http://localhost/~brian if your short user name is brian--like me). You should be rewarded with your page being displayed in your browser.

Continue with Setting Up A Website: Next Steps

All content and graphics copyright (c) 2012-2017 Brian Dentler - all rights reserved.