Web Hosting Talk







View Full Version : afew questions


theguy
12-06-2002, 01:14 PM
1) how to edit files such as httpd.conf using pico command

pico httpd.conf

i'm getting cpmmands at the end of page where i do not know how to use. like how to exit, how to copy and how to paste

2) how to make ssi work in html pages as well as shtml pages


3) how to make cgi scripts work outside cgi-bin directory

4) how to redirect pages not found (404) to a file you made


thanks for your help

Rich2k
12-06-2002, 03:27 PM
1) for files like httpd.conf I would actually use pico -w httpd.conf (stops line wrapping). However the commands are Exit: CTRL X (will prompt to save), Save: CTRL O. To copy and paste I use the built in commands in my SSH app.

2) Add to either your httpd.conf or a .htaccess the following line
AddHandler server-parsed .html

3) Add the following lines in httpd.conf

<Directory "/path/to/httpdocs/">
Options ExecCGI
AddType application/x-httpd-cgi .cgi
</Directory>

(if you add that to a .htaccess you don't need the <Directory> bits)

4) ErrorDocument 404 /404.html
will redirect and file not found to www.yourdomain.com/404.html