User Tools

Site Tools


building_a_website_on_sdf

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
building_a_website_on_sdf [2024/01/04 08:20] – Add link to list of domains for ARPA via mkhomepg peteyboybuilding_a_website_on_sdf [2025/03/24 20:39] (current) – simplify link to static site generator page and the wikipedia link peteyboy
Line 1: Line 1:
- ====== Building a website on SDF ======+====== Building a website on SDF ======
  
 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. 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.
Line 7: Line 7:
 ==== Getting Started ==== ==== Getting Started ====
  
-''mkhomepg'' This command needs to be executed before you can start building your web pages. 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.)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 urls in the form of //<your login>.freeshell.org//. For instance, user //((the original author of this tutorial: thanks, alterego!))alterego//'s web pages are stored at //alterego.freeshell.org//. If you're an ARPA member, there are many different domains you [[Domains available to ARPA members| may choose from]].+''mkhomepg'' – This command needs to be executed before you can start building your web pages. 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.) 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 urls in the form of //<your login>.freeshell.org//. For instance, user //((the original author of this tutorial: thanks, alterego!))alterego//'s web pages are stored at //alterego.freeshell.org//. If you're an ARPA member, there are many different domains you [[Domains available to ARPA members |may choose from]].
  
 So first, run at your ($) prompt: So first, run at your ($) prompt:
Line 15: Line 15:
 ==== Your First Page! ==== ==== Your First Page! ====
  
-Creating your first page is **__SO__** easy! First you'll need to open a text editor. SDF has many text editors installed but new users to UNIX often find that "nanois the easiest to work with.+Creating your first page is **__SO__** easy! First you'll need to open a text editor. SDF has many text editors installed but new users to UNIX often find that nano” is the easiest to work with.
  
-''nano ~/html/index.html'' This command starts the nano text editor, creating a new file, called //index.html// in your html directory.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.+''nano ~/html/index.html'' – This command starts the nano text editor, creating a new file, called //index.html// in your html directory.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.
  
     <html>     <html>
Line 33: Line 33:
 Right, now, do you remember that URL you selected when you ran ''mkhomepg''? Open a web browser and type that into the address bar. Hopefully, after a few seconds. You should see your very own web page! Right, now, do you remember that URL you selected when you ran ''mkhomepg''? Open a web browser and type that into the address bar. Hopefully, after a few seconds. You should see your very own web page!
  
-Here are ways you can [[accessing web spaces#WWW| view your page from the SDF shell]]+Here are ways you can [[accessing web spaces#WWW |view your page from the SDF shell]]
  
 ==== More Pages ==== ==== More Pages ====
-Okay, now that you have your first web page up, here are some [[resources_for_website_builders|Resources for Developing Your Website]]+ 
 +Okay, now that you have your first web page up, there are several ways you can proceed 
 +  * If you want to get your hands dirty with HTML markup, CSS, CGI and Javascript so you understand how the web works, here are some [[resources_for_website_builders |Resources for Developing Your Website]] 
 +  * If, however, your goal is to start getting content shared out to the web, there are many website tools you can use that you can set up in your web space that will take care of making it easy for you to start creating content without worrying about so much technical detail.  
 +    * There are several [[web content management | Content Management Systems (CMS) and wikis]] that you can install in your web space as an SDF user--most need ARPA membership--so you can hit the ground running with a decent looking site right away. 
 +    * There are several [[static site generators]] ([[wp>static site generator|SSG]]) installed at SDF, which will allow you to set up a website however you like (with a little learning of how the SSG works) and provide you with tools to update it.
  
 An important thing: your website files need to be set to particular user permissions in order to be viewable by the world. When you add pages or subdirectories to your web site, the easiest way to make sure it will all continue to work is to **remember, after you are done with your changes**, to run the command <code> An important thing: your website files need to be set to particular user permissions in order to be viewable by the world. When you add pages or subdirectories to your web site, the easiest way to make sure it will all continue to work is to **remember, after you are done with your changes**, to run the command <code>
Line 42: Line 47:
 </code> </code>
  The ''-p'' flag sets appropriate permissions for your //~/html//, //~/public_html/// directories on the cluster, including your VHOSTS, as well as your //~/html/<username>// directory on the [[metaarray|The MetaArray]].  The ''-p'' flag sets appropriate permissions for your //~/html//, //~/public_html/// directories on the cluster, including your VHOSTS, as well as your //~/html/<username>// directory on the [[metaarray|The MetaArray]].
- 
- 
  
 Here are all the options for the mkhomepg command, which you can see by running it with the ''h'' flag: Here are all the options for the mkhomepg command, which you can see by running it with the ''h'' flag:
Line 51: Line 54:
         mkhomepg -p         (set appropriate file permissions)         mkhomepg -p         (set appropriate file permissions)
         mkhomepg -a         (set or unset your custom URL)         mkhomepg -a         (set or unset your custom URL)
-        mkhomepg -        (set or unset http://sdf.org/~username) +        mkhomepg -        (set or unset http://sdf.org/~username) 
-        mkhomepg -t         (toggles SDF cluster/MetaArray hosting) +        mkhomepg -e        (enables SDF MetaArray hosting / disables cluster hosting) 
 +        mkhomepg -d        (disables SDF MetaArray hosting / enables cluster hosting)
 </code> </code>
  
Line 61: Line 64:
   * **Standard Site:** By default, your web site files go in your user folder on the cluster in the ''html'' subfolder. These files are then viewable  at //<your login>.freeshell.org//, or what other domain you set as a custom url with mkhomepg or from the ''maint'' command   * **Standard Site:** By default, your web site files go in your user folder on the cluster in the ''html'' subfolder. These files are then viewable  at //<your login>.freeshell.org//, or what other domain you set as a custom url with mkhomepg or from the ''maint'' command
   * **'Tilde' Site:** You may, if you first run ''mkhomepg -d'' also (or instead) place files in your ''public_html'' folder, and they will be accessible at your old school "tilde site" at //sdf.org/~<your login>//   * **'Tilde' Site:** You may, if you first run ''mkhomepg -d'' also (or instead) place files in your ''public_html'' folder, and they will be accessible at your old school "tilde site" at //sdf.org/~<your login>//
-  * **Virtual Host:** If you have a [[vhost]], you should place files for it in your //<nowiki>/html/vhost_name</nowiki>// folder, and they will appear from your properly configured VHOSTif you have signed up for this [[membership_levels|membership]] +  * **Virtual Host:** If you have a [[vhost]], **the way this is managed at SDF has changed** see [[Accessing Your VHOST Folders]] if you have signed up for this [[membership_levels |membership]] 
-  * **[[metaarray|The MetaArray]]:** If you want to host from the unlimited storage of the MetaArray, after you use ''mkhomepg -t'' to toggle your main web page from the cluster to the MetaArray, you should put your files on the metaarray at //~/html/<username>//, and as with the cluster, these will be accessible at //<your login>.freeshell.org//, or what other domain you set as a custom url with mkhomepg or from the ''maint'' command+  * **[[metaarray |The MetaArray]]:** If you want to host from the unlimited storage of the MetaArray, after you use ''mkhomepg -t'' to toggle your main web page from the cluster to the MetaArray, you should put your files on the metaarray at //~/html/<username>//, and as with the cluster, these will be accessible at //<your login>.freeshell.org//, or what other domain you set as a custom url with mkhomepg or from the ''maint'' command
  
 ===== Problems ===== ===== Problems =====
Line 68: Line 71:
 The most important thing you need to have is **patience**. Sometimes updates when running ''mkhomepg -p'' may take a few hours to complete, sometimes they will occur almost immediately. By using the higher functions of your brain and **patience** you will solve a lot of the problems you may meet! The most important thing you need to have is **patience**. Sometimes updates when running ''mkhomepg -p'' may take a few hours to complete, sometimes they will occur almost immediately. By using the higher functions of your brain and **patience** you will solve a lot of the problems you may meet!
  
-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, [[https://sdf.org/?faq?WEB?07|"CAN I DEFINE MY OWN 403, 404 and 405 ERROR DOCUMENTS?"]] item for this!+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, [[https://sdf.org/?faq?WEB?07 |CAN I DEFINE MY OWN 403, 404 and 405 ERROR DOCUMENTS?]] item for this!
  
 ==== Diagnose ==== ==== Diagnose ====
Line 87: Line 90:
  
 === Finding Your Logs for VHOSTs === === Finding Your Logs for VHOSTs ===
-If your site is VHOSTed, then you can access your site's own log file by ssh-ing to the ''norge'' server using your {LOGNAME}@{VHOSTDOMAIN} with your normal LOGNAME password, then your log files are ///var/log/nginx/{VHOSTDOMAIN}// and ///var/log/nginx/{VHOSTDOMAIN}.err//. ex:  + 
-  $ ssh peteyboy@irulecomputers.com +See [[accessing_your_vhost_folders|Accessing your VHOST Folders]] 
-  ... (login stuff) +
-  $ less /var/log/nginx/irulecomputers.com +
-  +
 ==== Web Server Details ==== ==== Web Server Details ====
 +
 Problems you may be having may relate to what web server your pages are running on. That depends, as above, on where you are storing the pages: Problems you may be having may relate to what web server your pages are running on. That depends, as above, on where you are storing the pages:
  
Line 104: Line 106:
 ======  More Help ====== ======  More Help ======
  
-For additional help, check the information in the FAQ page [[https://sdf.org/?faq?WEB?05|"What About the Access Logs, Statistics, and Quotas?"]]+For additional help, check the information in the FAQ page [[https://sdf.org/?faq?WEB?05 |What About the Access Logs, Statistics, and Quotas?]]
  
 ----- -----
  
 Traditional link (using [[wp>Revision_Control_System|RCS]]): http://sdf.org/?tutorials/building_a_website ,v 1.8 2020/01/01 22:29:35 niro Traditional link (using [[wp>Revision_Control_System|RCS]]): http://sdf.org/?tutorials/building_a_website ,v 1.8 2020/01/01 22:29:35 niro
- 
  
building_a_website_on_sdf.1704356416.txt.gz · Last modified: 2024/01/04 08:20 by peteyboy