Skip to content

Apache setup

Johannes Skov Frandsen edited this page Sep 7, 2015 · 2 revisions

VPU comes with .htaccess files, so you won't have to worry about configuring anything. Simply point your browser at the location where you installed the code!

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule ^$ app/public/ [L]
    RewriteRule (.*) app/public/$1 [L]
</IfModule>

Note that you will have to change the server_name to the name you use in your hosts file. You will also have to adjust the directories according to where you installed the code. In this configuration, /srv/http/vpu/ is the project root. The public-facing part of VisualPHPUnit, however, is located in app/public within the project root (so in this example, it's /srv/http/vpu/app/public).

When that's done, restart your web server, and then point your browser at the server name you chose above!

Troubleshooting

  1. Make sure mod_rewrite is enabled.
  2. Make sure AllowOverride in your httpd.conf is set to all.
  3. If you're using WAMP, you'll need to adjust the two .htaccess files to reflect the location where you extracted VPU. (In this example, VPU has been extracted to C:\wamp\www\vpu, where C:/wamp/www/ has been set as the DocumentRoot in httpd.conf.)
  • In the .htaccess file located at the root of the repository, add the following line after line 2: RewriteBase /vpu
  • In app/public/.htaccess, add the following line after line 2: RewriteBase /vpu/app/public

Clone this wiki locally