Forum

downloads file instead of opening page

Joe
11 July 2012, 02:01
I've been learning about Hiawatha and Linux as I go. I'm trying to expand my mineos server for use as a php test server. I'm having trouble with the CGI, though. With this configuration, I can open up index.phtml just fine, and navigate through my website. When I try to return to index.phtml via a link in my website, it downloads the file instead of opening it. I don't want to set the start file as index.phtml because I want to be able to host multiple test sites simultaneously, but that was the only way I could get it to recognize .phtml extensions at all. Most of the settings were the default that came with the mineos image I installed. Here's what I believe is relevant:

CGIhandler = /usr/bin/php-cgi:php,phtml,inc
...
CGIextension = py
ExecuteCGI = yes
...
Hostname = 127.0.0.1
WebsiteRoot = /var/www/hiawatha
StartFile = index.php
AccessLogfile ...
ErrorLogfile ...
AccessList = allow all
ShowIndex = yes
...
Directory {
Path = /var/www/hiawatha/test
ExecuteCGI = yes
TimeForCGI = 30
AccessList = allow all
StartFile = index.phtml
}

Any other suggestions are welcome, I'm very new at this.
Joe
11 July 2012, 22:32
I solved it, I didn't realize adding inc to CGIhandler was the problem.
This topic has been closed.