Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

tentativa inicial para rodar o cgi

git-svn-id: http://opensvn.csie.org/learn_to_program_pt_br/trunk@6 c24ce081-ecdb-4f3f-a214-8159a4f5ee6c
  • Loading branch information...
commit a458ba221b3273282fdeee4a7dff6ac67ece60fe 1 parent 50afe91
oliver authored
Showing with 20 additions and 0 deletions.
  1. +11 −0 httpd_conf_changes
  2. +9 −0 index.rb
11 httpd_conf_changes
View
@@ -0,0 +1,11 @@
+# colocar no seu httpd.conf
+# no mac, o path é /private/etc/httpd/users/nome_do_usuario.conf
+
+AddHandler cgi-script .rb
+
+<Directory /Users/oliver/Sites/>
+ Options Indexes MultiViews ExecCGI
+ AllowOverride None
+ Order allow,deny
+ Allow from all
+</Directory>
9 index.rb
View
@@ -0,0 +1,9 @@
+#!/usr/bin/env ruby
+
+require 'cgi'
+require 'stringio'
+require 'learn_to_program_tutorial'
+
+cgi = CGI.new
+
+LearnToProgramTutorial.handle_request cgi
Please sign in to comment.
Something went wrong with that request. Please try again.