Results 1 to 1 of 1
I have created a virtual host with following configuration
NameVirtualHost 192.168.0.2:80
#Default Host
<VirtualHost *>
DocumentRoot /var/www/html
ServerName Linux
DirectoryIndex index.html
</VirtualHost>
#My domain
<VirtualHost 192.168.0.2>
DocumentRoot /var/www/mysite
ServerName www.mysite.com
...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 08-08-2006 #1Just Joined!
- Join Date
- Jul 2006
- Posts
- 14
web server doesnt run cgi file
I have created a virtual host with following configuration
NameVirtualHost 192.168.0.2:80
#Default Host
<VirtualHost *>
DocumentRoot /var/www/html
ServerName Linux
DirectoryIndex index.html
</VirtualHost>
#My domain
<VirtualHost 192.168.0.2>
DocumentRoot /var/www/mysite
ServerName www.mysite.com
DirectoryIndex index.html
<Files results>
ForceType application/x-httpd-cgi
</Files>
<Directory "/var/www/mysite">
Options Indexes FollowSymLinks ExecCGI
AllowOverride None
Order allow, deny
Allow from all
</Directory>
</VirtualHost>
I have created a subdirectory that I named "result" under DocumentRoot directory mysite and placed a cgi file called results but with no .cgi extension but ForceType should take care of it.
but when I type URL www.mysite.com/result/results
it doesnt run the file as cgi script but a window appears telling me that
"you have chosen to open results which is a: application/x-httpd-cgi from: http://www.mysite.com
and asking me to open with or save to disk.
I am wondering why it is doing this instead of running it.
it runs when I put results in the main directory and typed
www.mysite.com/results
I also added the following line it maynot be necesary but I still added
AddHandler cgi-script .cgi
I will appreciate if anybody could help me in this
Thanks!!


Reply With Quote
