tutes-dump/site-tutorials/building_a_website.html

116 lines
4.4 KiB
HTML

<html><head>
<title>Building a website on SDF</title>
</head><body>
<h1>Building a website on SDF</h1>
<hr />
<h2>Contents</h2>
<ul>
<li><a href="#intro">Introduction</a><ul>
<li><a href="#getting_started">Getting Started</a></li>
</ul></li>
<li><a href="#firstpage">Your First Page!</a></li>
<li><a href="#problems">Problems</a></li>
<li><a href="#diagnose">Diagnose</a></li>
</ul>
<br />
<h2><a id="intro" /></a>Introduction</h2>
<p>Creating your own websites can be fun and SDF gives webspace to all its
validated users, so the moment you become validated you can begin creating
your own websites straight away.</p>
<p>In this tutorial when text looks like <code>this</code> this means it's a
command you can run in your shell, once you've logged into SDF.</p>
<h3><a id="getting_started" /></a>Getting Started</h3>
<ul>
<li><code>mkhomepg</code> - This command needs to be executed before you can
start building your web pages.
<p>When you execute this program, it will create a directory in which you
can put all your web files. This directory is sym-linked into your home
directory, under the name 'html'. (A sym-link is sort of like a shortcut in
Microsoft Windows.)</p>
<p>You will be prompted to select a URL for your website. This URL is
what other internet users type into their web browser to view your web
pages. If you're not an ARPA member then you may only use url's in the form
of '<code>&lt;your login&gt;.freeshell.org</code>'. For instance, my web
pages are stored at '<code>alterego.freeshell.org</code>'. If you're an ARPA
member, there are many different domains you may use.</p>
</li>
</ul>
<h2><a id="firstpage" /></a>Your First Page!</h2>
<p>Creating your first page is <b><u>SO</u></b> easy! First you'll need to open
a text editor. SDF has many text editors installed but new users to UNIX often find
that <code>nano</code> is the easiest to work with.</p>
<ul>
<li><code>nano ~/html/index.html</code> - This command starts the nano text
editor, creating a new file, called 'index.html' in your html
directory.</li>
<p>Once you've executed the command above. You'll notice that the terminal
layout has changed. If you press keys on your keyboard you'll notice they
appear in the "text buffer". Write out the text below into this program.</p>
<pre>
&lt;html&gt;&lt;head&gt;
&lt;title&gt;My First Page!&lt;/title&gt;
&lt;/head&gt;&lt;body&gt;
&lt;h1&gt;My First Page!&lt;/h1&gt;
&lt;p&gt;This is my first html web page!&lt;/p&gt;
&lt;/body&gt;&lt;/html&gt;
</pre>
<p>Now that you have copied the text out into 'nano', you need to save the
file. To do this, hold down the 'CTRL' key on your keyboard and whilst
pressing that, press the letter 'o'.</p>
<p>Right, now, do you remember that URL you selected when you ran
'<code>mkhomepg</code>'? Open a web browser and type that into the address
bar. Hopefully, after a few seconds. You should see your very own web
page!</p>
</ul>
<h2><a id="problems" />Problems</h2>
<p>The most important thing you need to have is <b>patience</b>. Sometimes updates when running <code>mkhomepg</code> may take a few hours to complete, sometimes they will occur almost immediately. By using the higher functions of your brain and <b>patience</b> you will solve a lot of the problems you may meet!</p>
<p>In case a page is not found on your site, the client may be forwarded to a
page of sdf.org or redmartian, which can be confusing (but which is
in fact completely reasonable, as all the domains belong to one entity). If
you want to prevent this also for broken links, you have to set up error
handler documents. Please consult the faq:WEB:7 item for this!</p>
<h2><a id="diagnose"/>Diagnose</h2>
<p>If your site is hosted on sdf.org (you are an ARPA member) then you
can grep inside the httpd log file in <code>/var/log</code>. For
example:</p>
<pre>
$ grep abc123.sdf.org /var/log/httpd/*.log
</pre>
<p>If your site is hosted on ma.sdf.org (you are a MetaARPA member)
then your can look inside the log file for your web site in
<code>/meta/log</code>. For example:</p>
<pre>
$ less /meta/log/abc123.sdf.org
</pre>
<p>For aditional help, check the information in the FAQ page <a
href="https://sdf.org/?faq?WEB?05">"What About the Access Logs,
Statistics, and Quotas?"</a></p>
</body></html>
$Id: building_a_website.html,v 1.8 2020/01/01 22:29:35 niro Exp $