1

I would like to make my UnitTests available to see via the browser.

My directory structure looks like this:

application
docs
public
 - index.php
tests

My DocumentRoot is in the public folder. However, when I try to add an alias /source to my Apache configuration and set add the type php-source to the .php files (instead of just .phps) Apache still tries to execute the files.

Is there a smart way to do this?

Sebastian Hoitz
  • 3,019
  • 3
  • 23
  • 19

2 Answers2

1

This is the solution I found:

Alias /test "/var/www/api_dev/tests"
<Directory "/var/www/api_dev/tests/">
     AddType application/x-httpd-php-source .php
</Directory>
Sebastian Hoitz
  • 3,019
  • 3
  • 23
  • 19
0

Easiest way, is simply rename/copy the file to a .phps extension.

The MIME type should already be in place and you should be ready to go.

  • Mime:text/html
  • Mime:application/x-httpd-php-source
  • Mime:application/x-httpd-php3-source
Brendan
  • 401
  • 2
  • 3
  • The problem with this is: I want the visitor to see my Unit tests that I also run to check my code. So I can't just rename the files to .phps. – Sebastian Hoitz May 18 '11 at 05:57