sudo vim /etc/httpd/conf/httpd.conf
When vim opens, uncomment the following: It may be faster to search in command mode (such as `` `/ cgi / g```).
#
AddHandler cgi-script .cgi #Maybe here?
#
Reboot.
sudo service httpd restart
Create the following file.
hello.cgi
#!/usr/bin/env python
# -*- coding: utf-8 -*-
print "Content-Type: text/plain"
print
print "hello world!"
Access http: // [address] /hello.cgi. I think it will be displayed ...
Forbidden
You don't have permission to access /hello.cgi on this server.
Since it says Permission, I tried something like `` `chmod 755 hello.cgi```, but it didn't change.
Recommended Posts