21
2010
Cgi bin directory for each user in Apache
This page http://httpd.apache.org/docs/2.2/howto/cgi.html describes how to give each user his own cg-bin directory.
The following lines should be added to the Apache configuration file http.conf :
<Directory /home/*/public_html/cgi-bin> Options ExecCGI SetHandler cgi-script </Directory>
Along with this there are some more points to be kept in mind. If you .htaccess file has a section like this :
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{http_host} ^site.com [nc]
RewriteRule ^(.*)$ http://www.site.com/$1 [r=301,nc]
</IfModule>
then putting the cgi configuration will give this error :
Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden
and the cgi files won’t work. The solution is : Options +ExecCGI instead of Options ExecCGI
Also make sure that this line :
ScriptAlias /cgi-bin/ “/var/www/cgi-bin/”
is commented, otherwise all request to www.site.com/cgi-bin would go to /var/www/cgi-bin instead of the user’s cgi-bin directory.
If you get Internal Server Errors then try the solutions given on this page
http://encodable.com/internal_server_error/
Popularity: 1% [?]
Related Posts
Leave a comment
Subscribe
Recent Posts
- Compile wxwebconnect on Ubuntu 11.04 64 bit
- Disqus Comments Importer Script in PHP
- Beginners’ guide to socket programming with winsock
- Handle multiple socket connections with fd_set and select on Linux
- Beginners guide to socket programming in C on Linux
- Gui whois client in python with wxpython
- Whois client code in C with Linux sockets
- str_replace for C
- Easy to use C/C++ IDE for Ubuntu Linux
- Get local ip in C on linux
An article by Binary Tides




