AWS Elastic Beanstalk allows you to deploy a web application that can scale to match end-user demand. This simple example will demonstrate how you can deploy AcuSensor together with your web application into AWS Elastic Beanstalk.

Step 1. Create your target in Acunetix

For this example, we will assume that the URL for your target is Create a target with your URL, enable AcuSensor, download the AcuSensor agent file acusensor.php, and save this file for use later on.

Step 2. Define the web application source bundle

This simple web application will be defined through the following file structure:

  1. Create the folders for your source bundle:
    mkdir ~/axexample
    mkdir ~/axexample/.ebextensions
    mkdir ~/axexample/acusensor
    mkdir ~/axexample/public
  2. Create your ~/axexample/.ebextensions/acusensor.config file to read as follows:
      "/etc/php.d/acusensor.ini" :
        mode: "000755"
        owner: root
        group: root
        content: |
  3. Create your ~/axexample/public/index.php file to read as follows:
        echo "<h1>Test PHP Site Example for AWS Elastic Beanstalk</h1>";
        echo "<br>";
        echo "Welcome to the main page.";
        echo "<br>";
        echo "<a href='test.php'>Go to the test page.</a>";
  4. Create your ~/axexample/public/test.php file to read as follows:
        echo "<h1>Test PHP Site Example for AWS Elastic Beanstalk</h1>";
        echo "<br>";
        echo "Welcome to the test page.";
        echo "<br>";
  5. Copy the acusensor.php file into ~/axexample/acusensor/acusensor.php
  6. Finally, build the source bundle with:
    cd ~/axexample
    zip -rq .

Step 3. Deploy your web application to AWS Elastic Beanstalk

  1. From your AWS Dashboard, navigate to Elastic Beanstalk > Environments
  2. Click on the Create a new environment button 

  3. Set your environment tier to Web server environment 

  4. Click on the Select button
  5. On the Elastic Beanstalk > Create environment page:
    • Set the Application name field to the name for your web application; in this example, you will use the name axexample-php 

    • Set the Platform dropdown to PHP 

    • Enable the Upload your code option and click on the Choose file button 

    • Select your source code bundle for upload and click on the Configure more options button 

    • In the Software panel, click on the Edit button 

    • On the Modify software page, set the Document root field to /public 

    • Scroll down to the bottom of the Modify software page and click on the Save button
    • Scroll down to the bottom of the Configure environment page and click on the Create environment button
  6. AWS Elastic Beanstalk will now create your environment; this can take a few minutes 

  7. When the process is complete, you will be sent to your environment’s dashboard 

  8. Take note of your environment’s new URL, which was created automatically by AWS Elastic Beanstalk:
    • You will need this to create a CNAME to point to this URL
    • In this example, we would create a CNAME for to point to; here is an example using the Namecheap cPanel interface: 

  9. Once the CNAME record has been added (giving time for DNS records to propagate), you can see the web application you have created by browsing to your URL (in this example, 

Step 4. Test and scan your web application

Point your browser to your web application – in this example, to confirm it is running as intended; you will get the following:

Finally, run a scan on your target; the Activity panel will confirm that AcuSensor was detected and used for the scan.

Kevin Attard Compagno
Technical Writer
Kevin Attard Compagno is a Technical Writer working for Acunetix. A technical writer, translator, and general IT buff for over 30 years, Kevin used to run Technical Support teams and create training documents and other material for in-house technical staff.