User Tools

Site Tools


gopher_site_setup_and_hosting_features

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
gopher_site_setup_and_hosting_features [2023/06/30 23:37] – [Caveat] hc9gopher_site_setup_and_hosting_features [2025/04/22 18:02] (current) – [Gophermap] slugmax
Line 1: Line 1:
 ====== Gopher ====== ====== Gopher ======
- 
  
 What is Gopher? What is Gopher?
Line 51: Line 50:
 ===== Publishing Content ===== ===== Publishing Content =====
  
-You can use mkgopher to publish documents, create directories, etc. You can also manage your Gopherspace manually. If you decide to do so, remember that the server will not display your content if it is not already visible to everyone. That is, files need to world-readable (chmod o+r $HOME/gopher/yourfile), directories need also to be world executable (chmod o+rx $HOME/gopher/yourdir), etc. **The gopher server ([[gopher://gophernicus.org/1/software/gophernicus/|Gophernicus]]) will serve executable files under /cgi-bin and also gophermaps which have executable permission as gopher CGIs or "moles(see below). In the case of gophermaps, this is likely to result in errors, so make sure your gophermaps do not have execute permission (chmod -x $HOME/gopher/yourdir/gophermap).**+You can use mkgopher to publish documents, create directories, etc. You can also manage your Gopherspace manually. If you decide to do so, remember that the server will not display your content if it is not already visible to everyone. That is, files need to world-readable (chmod o+r $HOME/gopher/yourfile), directories need also to be world executable (chmod o+rx $HOME/gopher/yourdir), etc. **The gopher server ([[gopher://gophernicus.org/1/software/gophernicus/|Gophernicus]]) will serve executable files under /cgi-bin and also gophermaps which have executable permission as gopher CGIs or moles” (see below). In the case of gophermaps, this is likely to result in errors, so make sure your gophermaps do not have execute permission (chmod -x $HOME/gopher/yourdir/gophermap).**
  
-The usual 'mkgopher -pcommand has not yet been updated to reflect Gophernicus' permissions requirements. So you may need to reset your permissions for all files and directories in your gopher directory as noted above. The following two commands will revert all files to world-readable but non-executable, and all directories to world-readable but executable.+The usual mkgopher -p’ command has not yet been updated to reflect Gophernicus' permissions requirements. So you may need to reset your permissions for all files and directories in your gopher directory as noted above. The following two commands will revert all files to world-readable but non-executable, and all directories to world-readable but executable.
  
   $ find ~/gopher/ -type f -print0 | xargs -0 chmod 644   $ find ~/gopher/ -type f -print0 | xargs -0 chmod 644
Line 62: Line 61:
 ==== Gophermap ==== ==== Gophermap ====
  
-**Note:** You can view the sample gophermap that comes with Gophernicus here: [[http://slugmax.tx0.org/README.Gophermap|README.Gophermap]]+**Note:** You can view the sample gophermap that comes with Gophernicus here: [[https://slugmax.sdf.org/README.Gophermap|README.Gophermap]]
  
 Say that you have file1.txt, file2.pdf, file3.rtf and dir in your Gopherspace (dir is a directory). That is, Say that you have file1.txt, file2.pdf, file3.rtf and dir in your Gopherspace (dir is a directory). That is,
Line 107: Line 106:
 | g | GIF image | | g | GIF image |
 | h | HTML, Hypertext Markup Language | | h | HTML, Hypertext Markup Language |
-| i | "inlinetext type |+| i | inline” text type |
 | s | Sound | | s | Sound |
 | I | Image (other than GIF) | | I | Image (other than GIF) |
Line 125: Line 124:
   0Why is Gopher Still Relevant? /gopher/relevance.txt gopher.floodgap.com 70   0Why is Gopher Still Relevant? /gopher/relevance.txt gopher.floodgap.com 70
   hAn http link URL:http://sdf.org/   hAn http link URL:http://sdf.org/
- 
  
 Remember the gophermap syntax? Then be careful about tab characters. In the example above, there are some<TAB>s. For instance, the third line is Remember the gophermap syntax? Then be careful about tab characters. In the example above, there are some<TAB>s. For instance, the third line is
Line 182: Line 180:
 </file> </file>
  
-//NOTE:// You can use the 'phlogcommand to add your phlog/glog to the gopher.club phlog listing, and you can then update the listing after you create a post by running the following command: "touch ~ftp/pub/users/$LOGNAME"+//NOTE:// You can use the phlog’ command to add your phlog/glog to the gopher.club phlog listing, and you can then update the listing after you create a post by running the following command: touch ~ftp/pub/users/$LOGNAME
  
 ==== Other glog/phlog software ==== ==== Other glog/phlog software ====
Line 192: Line 190:
       * gopher://sdf.org/0/users/slugmax/about-slerm.txt        * gopher://sdf.org/0/users/slugmax/about-slerm.txt 
       * gopher://sdf.org/9/users/slugmax/code/slerm-1.8.tgz        * gopher://sdf.org/9/users/slugmax/code/slerm-1.8.tgz 
-      * http://slugmax.tx0.org/slerm-1.8.tgz+      * https://slugmax.sdf.org/slerm-1.8.tgz
    * glog    * glog
       gopher://sdf.org/0/users/yargo/scripts/glog.sh       gopher://sdf.org/0/users/yargo/scripts/glog.sh
Line 213: Line 211:
 ==== Mole examples ==== ==== Mole examples ====
  
-Remember that your moles need to be executable (and readable) by everyone, and under /cgi-bin. So you will have to do: "chmod 755 YOURSCRIPT.cgi"+Remember that your moles need to be executable (and readable) by everyone, and under /cgi-bin. So you will have to do: chmod 755 YOURSCRIPT.cgi
  
 === fortune.cgi === === fortune.cgi ===
Line 224: Line 222:
 Easy enough, isn't it? As it is raw text, you can access it using am itemtype = 0, that is: gopher://sdf.org/0/users/YOUR-USERNAME/cgi-bin/fortune.cgi Easy enough, isn't it? As it is raw text, you can access it using am itemtype = 0, that is: gopher://sdf.org/0/users/YOUR-USERNAME/cgi-bin/fortune.cgi
  
-Did you notice that fortune was called with a full path? OK, that's because the server's path is PATH=/sbin:/bin:/usr/sbin:/usr/bin. That means that if you call a program without a path, the server will search in /sbin, /bin, /usr/sbin and /usr/bin. There's no /usr/pkg/games, or other path in the server's $PATH (eventually, you can add a path of your choice with, e.g., "PATH=$PATH:/usr/pkg/games").+Did you notice that fortune was called with a full path? OK, that's because the server's path is PATH=/sbin:/bin:/usr/sbin:/usr/bin. That means that if you call a program without a path, the server will search in /sbin, /bin, /usr/sbin and /usr/bin. There's no /usr/pkg/games, or other path in the server's $PATH (eventually, you can add a path of your choice with, e.g., PATH=$PATH:/usr/pkg/games).
  
 === ls.cgi === === ls.cgi ===
Line 267: Line 265:
 </code> </code>
  
-Note that the echo... line is\\ echo "$itemtype$content ($date)<TAB>$rel_dir<TAB>$server<TAB>$port" "+Note that the echo… line is\\ “ ''echo "$itemtype$content ($date)<TAB>$rel_dir<TAB>$server<TAB>$port"''
  
 If you go to gopher://sdf.org/1/users/YOUR-USERNAME/cgi-bin/ls.cgi , you will see a list of your files sorted alphabetically. If you access your mole as gopher://sdf.org/1/users/YOUR-USERNAME/cgi-bin/ls.cgi?date , then you'll see your files/directories sorted by modification time. If you go to gopher://sdf.org/1/users/YOUR-USERNAME/cgi-bin/ls.cgi , you will see a list of your files sorted alphabetically. If you access your mole as gopher://sdf.org/1/users/YOUR-USERNAME/cgi-bin/ls.cgi?date , then you'll see your files/directories sorted by modification time.
Line 290: Line 288:
 ==== Caveat ==== ==== Caveat ====
  
-Besides ((//Footnote to trigger the index ''<nowiki>https://www.dokuwiki.org/faq:searchindex</nowiki>''//.)) what was said in the last paragraph of the figlet.cgi example, there's also another thing to stress. In that example (as with anything that will be served as a virtual directory or with an itemtype 1 or 7), content won't be displayed if you access your script via floodgap proxy (and maybe others). In this case you will need to format the output of your script. Luckily this is very easy. For instance, in the figlet.cgi example you will need to modify the echo ... line this way:+Besides what was said in the last paragraph of the figlet.cgi example, there's also another thing to stress. In that example (as with anything that will be served as a virtual directory or with an itemtype 1 or 7), content won't be displayed if you access your script via floodgap proxy (and maybe others). In this case you will need to format the output of your script. Luckily this is very easy. For instance, in the figlet.cgi example you will need to modify the echo ... line this way:
  
 ''echo "i$i<TAB><TAB>error.host<TAB>1"'' ''echo "i$i<TAB><TAB>error.host<TAB>1"''
  
 where <TAB> is a tab character (you should already know this!)C and error.host and 1 are, respectively, a fake server and port number (you could also have written fake instead of error.host and 300 instead of 1). where <TAB> is a tab character (you should already know this!)C and error.host and 1 are, respectively, a fake server and port number (you could also have written fake instead of error.host and 300 instead of 1).
- 
  
 ---- ----
gopher_site_setup_and_hosting_features.1688168250.txt · Last modified: 2023/06/30 23:37 by hc9