july 14,2015

Today, my problem was solved. Now I am happy. From last two days, I was trying to configure Apache2 with CGI. But it gave many errors from the starting point. FIrstly, I does not have default file in sites-available folder of  Apache2 ,Actually dafault file contains code for CGI. So I changed the permissions  (from -r-to -rw-) of  etc/Apache2/sites-available/000-dafult.conf file and write CGI code in it. But still it gaves Internal Error when I run hello.py on browser. Whole day, I was trying.

But today, Sir help me and my problem solved. Actually I run python file hello.py from  /var/www/ Which can’t run python file. It just run HTML files. I have to run python file from usr/lib/cgi-bin/hello.py. But it gives error NOT FOUND when I run hello.py from /usr/lib/cgi-bin/hello.py. Beacause I did not write comment #! usr/bin/python , When I add this comment to my file. It works.


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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s