To be able to run and debug a website, you first need to edit the site's properties. To do that, in NetBeans' Projects pane, right-click on the project's name, and from context menu select Properties item. The project's Properties dialog will appear (shown in figure B.1).
In the left pane of the dialog that appears, click the Sources node. In the right pane, edit the Web Root field to point to your website's APP_DIR/public directory. You can do this by clicking the Browse button to the right of the field. Then, in the dialog, click on the public directory and then click Select Folder button (shown in figure B.2).
Next, click the Run Configuration node in the left pane. The right pane should display the run settings for your site (figure B.3).
In the right pane, you can see that the current configuration is "default". As an option, you can create several run configurations.
Edit the fields as follows:
In the Run As field, select "Local Website (running on local web server)".
In the Project URL field, enter "http://localhost". If you configured your virtual host to listen on different port (say, on port 8080), enter the port number like this "http://localhost:8080".
Keep the Index File field empty, because Apache's mod_rewrite module will mask our actual index.php file.
In the Arguments field, you can specify which GET parameters to pass to your site through the URL string. Typically, you keep this field empty.
Finally, click the OK button to close the Properties dialog.