Webpages
Stack offers all members the possibility to create their own website and put HTML pages online on the Stack webserver, http://www.stack.nl/.
Contents |
How can I create my own webpage?
In your homedirectory on the Stack server, you can find a subdirectory named .html. An other name for this directory is /www/username/, which might be convenient when you are using and FTP client that doesn't show directory names starting with a dot. All the files that you put in this directory can be found online via de Stack webserver. The file named index.html in that directory will correspond with you homepage, http://www.stack.nl/~username/.
How to use server-side includes?
Server-side includes (or SSI for short) are special codes that may be included in your HTML pages. When somebody visits this page with a browser, the webserver will automatically replace these codes with specific output. This allows you to simply create dynamic pages, for instance by including a date or visitor counter. A simple pageview counter can be includes with <!--#count-total-->. A full list of all SSI codes is listed in man httpd_ssi.
What are CGI scripts?
Users can make interactive webpages by using small programs on the server. These programs can take the input from a browser (e.g. by using a HTML form) and generate HTML output based on this. This may be used to handle online registration forms. These programs are called CGI binaries or CGI scripts. CGI stands for Common Gateway Interface. These CGI scripts should be put in the .html subdirectory cgi-bin.
CGI scripts can also be run from a regular HTML webpage by using the run-cgi server-side include.
See the httpd_cgi manual page for full details on the features of CGI scripts with the Stack webserver.
What are PHP scripts?
The PHP scripting language offers an alternative method to make your HTML pages interactive. PHP commands can be included in your HTML text, just like server-side include commands. These commands will also be interpreted by the server - unlike JavaScript codes which will be executed by the browser (client-side). Pages using PHP commands should have the filename extension .php. PHP codes should be surrounded by special tags: <?php [...] ?>. For more information about PHP refer to http://phpdocs.stack.nl/.
Where to find pageview statistics?
We use the sconstat program to generate daily statistical overviews of all user pages. By default the result is available via a page on your website: http:///www.stack.nl/~username/sconstat/stats.html.
A daily summary of visitor information can be send to you via email as well. Please contact the Webmasters if you would like to receive this messages.
What is an imagemap?
An imagemap, or clickable image offers graphical navigation links. Several areas in the image may be appointed, each of them leading to another location. When the users clicks somewhere on the image, the webserver will find the corresponding URL in an imagemap file on the server. Clickable images should include the ISMAP tag in the HTML code. Tools to create such mapfiles can be found online on many locations (you can use vi if you know what you're doing). An explanation on how to use these files once you have them, is available in the imagemap manual.
Restricting access to a directory
- When you want to completely block access to a directory via the webserver (temporarily), put an empty file named .noxs in that directory and nobody will be able to visit it anymore.
- Access may be limited based on IP address using a .noxs file as well: simply list the addresses that should have access in this file. Refer to the manpage for details.
- To restrict access to a directory with a password, use the xspasswd feature. First cd to the directory you want to protect, then run the xspasswd command. It will prompt you for a username and password, used to restrict access on that directory via the web. By running the command multiple times, you can grant access to multiple accounts. See the xspasswd manpage for full options.
Can I use my own domain name (www.myname.nl)?
Yes, Stack offers virtual hosting for websites to its members. If you have your own domain name, you can use it for your Stack website as well. See virtual hosting for more information.