====== Student Websites ====== *Policy change effective August 1, 2008 * Websites will be hosted for required classwork and at the direction of faculty only. Personal web hosting is no longer offered. There are better alternatives commercially available for free. * These webpages can be found at http://people.aero.und.edu/~username. Username refers to the Aerospace username. ===== Password Protection ===== Create a file called .htaccess in the directory you want to protect. AuthType Basic AuthName "Password Protected" Require user joeuser deny from all allow from 134.129.217.183 ===== Running CGI Programs ===== * Default CGI directory is ~username/public_html/cgi-bin * To debug, just access your script using the cgi-bin-d directory in the request. Example: https://people.aero.und.edu/~user/cgi-bin-d/test.cgi. * CGI scripts accessed through ~/username requests are automatically "wrapped" to protect the user and server. Cgi-Wrap prevents a script from utilizing more than it's fair share of CPU or memory. * Manage your running processes using [[resource:ssh|SSH]], and the linux commands "ps" and "kill" * ++ Advanced java-cgi example...| public class HelloWorld { public static void main(String[] Args) { System.out.println("Content-Type: text/html\n\n"); System.out.println("Hello WorldHello World"); } } cd ~/public_html/cgi-bin javac HelloWorld.java #!/bin/sh /usr/java/bin/java HelloWorld chmod o+rx ~/public_html/cgi-bin/java.cgi chmod go+r ~/public_html/cgi-bin/HelloWorld.class chmod go-r ~/public_html/cgi-bin/HelloWorld.java Enjoy at http://people.aero.und.edu/~username/cgi-bin/java.cgi ===== Scripting and Database support ===== *PHP *[[resource:mysql:home|MySQL]]