How to configure cgi-bin in Home Folder?

Earlier I explained how to run websites from the home. Today I will tell how to configure for cgi-bin so that you can run cgi scripts from home itself.

1. Open /etc/apache2/httpd.cfg file.

$ sudo vi /etc/apache2/httpd.cfg file

2. Copy the following lines in it.

ScriptAlias /cgi-bin/ /home/priyanka/public_html/cgi-bin/
              <Directory /home/priyanka/public_html/cgi-bin/>
              AllowOverride None
              Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
              SetHandler cgi-script
              Order allow,deny
              Allow from all
              AddHandler cgi-script .cgi .pl
              </Directory>

3. Restart the apache with the following command:

$ sudo /etc/init.d/apache2 restart

And you are done. 🙂

Advertisements

About Priyanka Kapoor

Simple, Hardworking & friendly.....
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s