Chapter 27: Web Development under UNIX


Overview

In Chapter 16, you learned how a Web server is set up. In this chapter, you will learn about how to create up a web site. That is, you will learn how to develop the web pages that make up a web site. You may want to create your own web pages for a variety of reasons. For example, you may want to create a personal home page to tell the world about yourself, as well as your family, travels, hobbies, and politics, among other things. You may also want to provide links to your own favorite web sites. You may have your own business and would like to build web pages to advertise your products and/or services and even to take orders. You may want to help build web pages for an educational institution or for a charitable organization. No matter what your reason, you will find building web pages easier and more rewarding than you think.

This chapter tells you how to get started creating Hypertext Markup Language (HTML) documents, which hold the content and formatting elements that are presented as pages on the web. You will learn the syntax and formatting tags of basic HTML. You will also learn about web development standards such as JavaScript, the Document Object Model, and Cascading Style Sheets that you can use to get beyond the limitations of simple HTML. The chapter will also give you an introduction to web programming with the Common Gateway Interface and the PHP language, with which you can develop web applications.

This chapter does not tell you what to name your HTML documents or how to make them available to others on the web. That depends on the software platform you are using, the web server running on your platform, and the local server configuration. Contact your system administrator or a local guru for the specifics. If you know that a web server is installed on your machine and that user directories have been enabled (see the section “User Directories” of Chapter 16), try the following steps to create and test a simple personal home page:

  1. Create a directory directly under your home directory with the name public_html with permissions of 0755, that is, with world read and search permission.

  2. Following a simple example from the section “Creating an HTML Document” in this chapter, construct your home page in a file named index.html in the public_html directory Give the index.html file 0644 permissions-that is, with world read permission. The $HOME/public_html directory is the default directory for personal home pages for many web servers, including the Apache Web Server, discussed in Chapter 16.

  3. Browse your home page with the following URL: http://my.machine.name/~user_name

where user_name is your UNIX user ID on the web server machine.

Though the preceding URL does not explicitly include the public_html directory or index.html file, many web servers look for an index.html file by default in the public_html directory belonging to user_name and serve it to web browsers automatically If Step 3 succeeds and you get a valid web page in your browser, your web server is set up and ready for use. If Step 3 fails, you should contact your system administrator.




UNIX. The Complete Reference
UNIX: The Complete Reference, Second Edition (Complete Reference Series)
ISBN: 0072263369
EAN: 2147483647
Year: 2006
Pages: 316

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net