Difference between revisions of "CGI"
(imported CGI guide to wiki format) |
|||
(7 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
==Using CGI on CSEE Personal Web Pages== | ==Using CGI on CSEE Personal Web Pages== | ||
− | 1. | + | 1. [[SSH/SCP/SFTP|Login]] to your CSEE account. |
− | 2. | + | 2. Set up your [[Web Introduction|Personal Web Site]] if you have not done so already. |
− | + | 2. Create a cgi-bin directory to store your CGI scripts. | |
− | <code> | + | <code>mkdir -p /web/userpages/''username''/cgi-bin</code> |
− | + | <code>chmod 701 /web/userpages/''username''/cgi-bin</code> | |
− | + | 3. Place your CGI files in the /web/userpages/''username''/cgi-bin directory. Ensure that the filenames for CGI executables end in .cgi OR .pl, otherwise the server will NOT recognize them as CGI scripts. | |
− | 5. IMPORTANT: CGI scripts run as your account permissions. Be careful since a badly written script could allow someone to access your account/data. Do not put arbitrary CGI code up if you don't know how it works. Follow the best | + | 4. CGI script are accessed as a standard HTML link: <nowiki>http://userpages.cs.umbc.edu/''username''/cgi-bin/filename.cgi</nowiki> |
+ | |||
+ | 5. IMPORTANT: CGI scripts run as your account permissions. Be careful since a badly written script could allow someone to access your account/data. Do not put arbitrary CGI code up if you don't know how it works. Follow the best security practices when you are writing your own CGI script. There are many good references on the web for CGI script security issues. If you use CGI scripts, it is highly recommend to research and become familiar with the issues regarding CGI. | ||
6. The PHP language can be used for writing CGI scripts. Read the documentation at [http://www.php.net/ PHP.net] and the [[PHP|CSEE PHP Guide]] for more information. | 6. The PHP language can be used for writing CGI scripts. Read the documentation at [http://www.php.net/ PHP.net] and the [[PHP|CSEE PHP Guide]] for more information. | ||
− | 7. CSEEIT reserves the right to discontinue access or disable user's CGI scripts that is doing something bad (such as, but not limited to enabling an email relay, providing illegal services, using too much CPU time, something that is deemed undesirable) | + | 7. CSEEIT reserves the right to discontinue access or disable user's CGI scripts that is doing something bad (such as, but not limited to enabling an email relay, providing illegal services, using too much CPU time, or something that is deemed undesirable). Under Maryland state law, CSEEIT has the responsibility take appropriate action to protect the state-owned equipment in the CSEE department at UMBC. |
Latest revision as of 14:16, 23 July 2024
Using CGI on CSEE Personal Web Pages
1. Login to your CSEE account.
2. Set up your Personal Web Site if you have not done so already.
2. Create a cgi-bin directory to store your CGI scripts.
mkdir -p /web/userpages/username/cgi-bin
chmod 701 /web/userpages/username/cgi-bin
3. Place your CGI files in the /web/userpages/username/cgi-bin directory. Ensure that the filenames for CGI executables end in .cgi OR .pl, otherwise the server will NOT recognize them as CGI scripts.
4. CGI script are accessed as a standard HTML link: http://userpages.cs.umbc.edu/''username''/cgi-bin/filename.cgi
5. IMPORTANT: CGI scripts run as your account permissions. Be careful since a badly written script could allow someone to access your account/data. Do not put arbitrary CGI code up if you don't know how it works. Follow the best security practices when you are writing your own CGI script. There are many good references on the web for CGI script security issues. If you use CGI scripts, it is highly recommend to research and become familiar with the issues regarding CGI.
6. The PHP language can be used for writing CGI scripts. Read the documentation at PHP.net and the CSEE PHP Guide for more information.
7. CSEEIT reserves the right to discontinue access or disable user's CGI scripts that is doing something bad (such as, but not limited to enabling an email relay, providing illegal services, using too much CPU time, or something that is deemed undesirable). Under Maryland state law, CSEEIT has the responsibility take appropriate action to protect the state-owned equipment in the CSEE department at UMBC.