> On 4/26/06, Dave Muhammad <[EMAIL PROTECTED]> wrote: > > > > Subject: Re: [tanya-jawab] tanya cgi-bin > > > > > > On 4/26/06, Asfihani <[EMAIL PROTECTED]> wrote: > > > rednux wrote: > > > > kawan, > > > > > > > > secara default lokasi directory 'CGI-BIN' saya ada di > > /usr/local/apache/cgi-bin/ > > > > nah bagaimana caranya agar setiap Document root atau Virtual Host bisa > > > > menggunakan cgi-bin juga. > > > > > > Apache versi berapa ya? Kalau versi 2.0 coba baca > > > http://httpd.apache.org/docs/2.0/howto/cgi.html bagian "CGI > > > outside of ScriptAlias directories" > > > > > > Wassalam, > > > > > > Asfihani > > > > > > > > > > > sehingga nantinya bisa kita 'eksekusi' menggunakan (misal) > > > > http://nama_domain_virtual_ke_1/cgi-bin/perintah? > > > > atau > > > > http://nama_domain_virtual_ke_2/cgi-bin/perintah? > > > > dst... > > > > > > > > terimakasih > > > > saya buat dir "/cgi-bin/" di virtual domain saya misal: > > /usr/local/apache/htdocs/domain1/cgi-bin/ > > > > kemudian saya letakkan test.pl di : > > /usr/local/apache/htdocs/domain1/cgi-bin/ > > > > saya coba : http://domain1/cgi-bin/test.pl > > Not Found > > The requested URL /cgi-bin/1.pl was not found on this server. > > > > saya letakkan letakkan test.pl di : > > /usr/local/apache/cgi-bin/test.pl dan saya coba > > http://domain1/cgi-bin/test.pl > > > > Hello, World. > > > > sebelumnya di "httpd.conf" sudah saya tambahkan : > > <Directory /usr/local/apache/htdocs/domain1> > > Options +ExecCGI > > </Directory> > > dan > > AddHandler cgi-script cgi pl > > > > mohon pencerahannya lagi nih :) > > > > -- > > Coba tambahkan di 'httpd.conf' > > <VirtualHost DOMAIN1> > > ServerName DOMAIN1 > > ServerAdmin [EMAIL PROTECTED] > > DocumentRoot /usr/local/apache/htdocs/domain1 > > ScriptAlias /cgi-bin/ / usr/local/apache/htdocs/domain1/cgi-bin/ # ini yg > > ditambahkan > > </VirtualHost> > > > > 500: Internal Server Error > The server encountered an internal error or misconfiguration and was > unable to complete your request...blah.. > > saya cek di log errornya : > [error] (2)No such file or directory: exec of > /usr/local/apache/htdocs/xxxxx/cgi-bin/1.pl failed > [Wed Apr 26 10:25:03 2006] [error] [client 202.xxx.xxx.xxx] Premature > end of script headers: / usr/local/apache/htdocs/xxxxx/cgi-bin/1.pl > > mohon solusinya.. > > -- > SOLUSI : > 1. chmod /cgi-bin/ 777 > > 2. tambahkan pada script (misal) test.pl > #!/usr/bin/perl -w > print "Content-type: text/html\r\n\r\n"; > print "Hello, World.";. > > 3. $chmod a+x test.pl > > Semoga berhasil > > > -- Siipp...mas dave...udah bisa..pakai '-w' : #!/usr/bin/perl -w
-- FAQ milis di http://wiki.linux.or.id/FAQ_milis_tanya-jawab Unsubscribe: kirim email ke [EMAIL PROTECTED] Arsip dan info milis selengkapnya di http://linux.or.id/milis