-
Notifications
You must be signed in to change notification settings - Fork 132
Nginx setup
Johannes Skov Frandsen edited this page Sep 7, 2015
·
1 revision
Place this code block within the http {} block in your nginx.conf file:
server {
server_name vpu;
root /srv/http/vpu/app/public;
index index.php;
access_log /var/log/nginx/vpu_access.log;
error_log /var/log/nginx/vpu_error.log;
location / {
try_files $uri /index.php;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}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!