
Ubuntu日本語フォーラム

ログインしていません。
hotohoto です。
32bit UBUNTU 14.04 32bit LXDE 環境で
apache2 を入れました。
CGIを設定しようとして
http://www.server-world.info/query?os=Ubuntu_14.04&p=httpd&f=2
を見て改築しました。
インストールは無事に行きました。
しかし 403Forbiddenが収まりません。
足りない何かがあるのでしょうか?
/etc/apache2/mods-enabled/dir.conf
<IfModule mod_dir.c> DirectoryIndex index.html index.htm index.cgi </IfModule>
/etc/apache2/mods-enabled/mime.conf
AddHandler cgi-script .pl .cgi
/etc/apache2/sites-enabled/000-default.conf
#13行目辺り DocumentRoot /var/www/html </Directory> <Directory "/var/www/html"> AllowOverride All Options +ExecCGI Require all granted </Directory>
a2enmod cgi したら Module cgi already enabled
・・・・・: /var/www/html$ sudo /etc/init.d/apache2 restart * Restarting web server apache2 [ OK ]
#!/usr/bin/perl print "Content-type: text/html\n\n"; print "<html>\n<body>\n"; print "<div style=\"width: 100%; font-size: 40px; font-weight: bold; text-align: center;\">\n"; print "CGI Test Page"; print "\n</div>\n"; print "</body>\n</html>\n"; index.cgi (END)
その後
chmod 705 index.cgi
して
firefox index.cgi
すると
firefox の画面上にTEXT文が表示されます
こんな感じ↓
#!/usr/bin/perl print "Content-type: text/html\n\n"; print "<html>\n<body>\n"; print "<div style=\"width: 100%; font-size: 40px; font-weight: bold; text-align: center;\">\n"; print "CGI Test Page"; print "\n</div>\n"; print "</body>\n</html>\n";
オフライン
色々ほかも探しています。こういうのもありました。
http://qiita.com/Morikuma_Works/items/30abe1a68a3a4e8881ab
/var/www/html$ apache2 -v Server version: Apache/2.4.7 (Ubuntu) Server built: Jul 22 2014 14:36:39
オフライン