Web Stack Getting Started Guide

ProcedureTo Configure PHP, Apache, and NetBeans

  1. Register Apache Web Server with NetBeans.

    1. In the NetBeans IDE, select the Services tab, select Web Servers > Add Host and select Local Web Server.

    2. Enter the correct path to Apache 2 configuration file.

      The default path of the Apache configuration file, httpd.conf is: /etc/apache2/2.2.

    3. Accept the default path for the Document Root field.

    4. Click Finish.

      The Apache 2 web server is listed under the Web Server node.

  2. Create a PHP project using NetBeans.

    1. Select File > New Project.

    2. Select PHP Project from the PHP category.

    3. Enter a target server for your PHP project.

    4. Click Finish.

  3. Write a PHP program.

  4. Right click on the project and select Run Project to view the output on a browser.