Difference between revisions of "Web Space"
(Created page with "Users with accounts on jumpgate-phasta.colorado.edu automatically have some web space. To use it you should make a directory called "public_html" in your home directory, and set ...") |
(No difference)
|
Revision as of 17:34, 25 January 2012
Users with accounts on jumpgate-phasta.colorado.edu automatically have some web space. To use it you should make a directory called "public_html" in your home directory, and set it so that it can be read by other users
mkdir ~/public_html chmod a+rx ~/public_html echo '<html><head></head><body>Hello World</body></html>' >> ~/public_html/index.html chmod a+r ~/public_html/index.html
Restricting Access
The web server will obey certain apache configuration directives put in files called ".htaccess" with appropriate permissions.
For example, to have the server require a password to view the contents of a directory over the web, you might put this in your .htaccess (note that .htaccess files apply to the directories containing them):
AuthUserFile /users/your_user/public_html/.htpasswd AuthName "Enter the password" AuthType Basic require valid-user
You'll also need to create the .htpasswd file that you specified above using the "htpasswd" tool:
htpasswd -c /users/your_user/public_html/.htpasswd username_to_add
HTML Basics
HTML is a markup language. This means that you insert extra information ("tags") which tell the interpreter (web browser) information about the content that you're providing so that it can be displayed properly. The absolute minimal html file should have the following:
<html> <body> Your Content Here </body> </html>
Each tag should always be closed. For example, if you wanted to link to a website, you could use the "a" tag:
<a href="http://www.google.com"> Google! </a>
The link tag here is opened, a parameter is specified, some text is provided ("Google!") and it is then closed with the corresponding closing tag "</a>"
Some other useful HTML tags are:
- start a paragraph
- break
HTML Resources
http://w3schools.com/ http://www.webmonkey.com/