Sun Java System Web Server 7.0 Update 3 Administrator's Guide

Configuring FastCGI Plug-in on Web Server from Administration Console

ProcedureTo Configure FastCGI Plug-in from Administration Console

  1. Download the FastCGI enabled Sun Java System Web Server 7.0 PHP Add-On 1.0 from: http://www.sun.com/download/index.jsp

  2. Configure PHP as a FastCGI server on Web Server.

    1. Unpack the phppack-5_2_0*.zip to /export/home


      $ cd /export/home; unzip phppack-5_2_0*.zip
    2. Start the Administration Server.


      $ <webserver-install-root>/admin-server/bin/startserv
    3. Configure FastCGI handler using Administration Console.

      1. Login to Administration Console.

      2. Click Edit Virtual Server from Virtual Server Tasks.

      3. Click Content Handling tab in the Virtual Server General Properties.

      4. Click FastCGI tab in the Content Handling — General Properties.

      5. Click New button to add a new URI with FastCGI handler mapping.

        Enter the following values:

        • Applies To: Select New URI and enter /fastcgi/*

        • Role: Select Responder from the drop-down list.

        • Application Path: Enter /export/home/php/bin/php as the path.

        • Environment Variables: Enter the variable:


          "PHPRC=/export/home/php","LD_LIBRARY_PATH=/export/home/php",
          "LD_LIBRARY_PATH_64=/export/home/php/64"
      6. Click OK button. You may need to click on Deploy button for the configuration if needed.

  3. Create a symbolic link.


    $ ln -s <webserver-install-root>/samples/fastcgi <webserver-instance-docroot>
  4. Run the samples.

    • Hello World sample URL

      http://<host-name>:<webserver-instance-port>/fastcgi/HelloWorld.php

    • Directory Listing sample URL

      http://<host-name>:<webserver-instance-port>/fastcgi/directory.php

    • Page Counter sample URL

      http://<host-name>:<webserver-instance-port>/fastcgi/pageCounter.php

    • Server Information sample URL

      http://<host-name>:<webserver-instance-port>/fastcgi/serverinfo.php