The Apache Haus Forum

Advanced search  


Welcome to Apache Haus Distribution Forum

Pages: [1]   Go Down

Author Topic: Apache + PHP Installer  (Read 47 times)


  • Newbie
  • *
  • Offline Offline
  • Posts: 3
Apache + PHP Installer
« on: August 01, 2020, 09:43:06 PM »

As part of my job I have to install and uninstall Apache quite frequently for our apprentices, sometimes with PHP, sometimes without.

Because of this, I made an installer. I don't mean a collection of scripts, but a real installer like you would use for any other software.

I originally didn't intend for it to be used publicly but I changed a few things to make it suitable. Notable features:

  • Created a page for update checks and download of installer bundles. There's currently only one installer but I intend for it to grow over time
  • Made installer more foolproof (It should stop the service when you try to update a running instance for example)
  • Added ability to create firewall rules
  • It will create the configuration files and php.ini if not present but will never overwrite them
  • php.ini is dynamically changed to reflect a custom path selection by the user
  • Post install notes that provide some troubleshooting hints and explain the problems that can arise from running Apache as "Local Service"
  • Digital signature. Note: Only the installer and uninstaller are currently signed. I can sign all Apache+PHP binaries in the installer upon popular request but it should not be necessary
  • Made PHP optional
  • Added the license and changes file
  • Permission hardening can be reversed and reapplied at any time
  • Removes firewall rules again when you uninstall
  • The contents of "htdocs" are never deleted when uninstalling in case you need them later
  • Apache is run under an unprivileged "Local Service" user instead of a god account
  • It should work if there are spaces in the path name (I still recommend you don't)

I can include all the optional modules if requested. I do not plan on creating 32 bit installers.

The default server configuration has been slightly changed:

  • Apache is configured to use PHP as a CGI module using the ScriptAlias/ContentType model. This is always present, even if you don't install PHP, but in that case it has no effect
  • index.php added to the automatic directory index
  • inclusion of conf/extra/httpd-mpm.conf is enabled by default

The PHP configuration is as follows:

  • The base is the development PHP ini file
  • Custom "temp" and "session" paths so PHP doesn't pollutes the Windows temp directory
  • Safer session handling (user can't create their own id, the id is not accessible from JS)
  • Configured a CA file that's in sync with Windows (at the time of creating the setup)

If interested, you can obtain the setup here:

Feedback is encouraged. Thank you.


  • Administrator
  • Member Elite
  • *****
  • Offline Offline
  • Posts: 600
Re: Apache + PHP Installer
« Reply #1 on: Today at 10:11:19 AM »

That is a great tool. You only should avoid using the feather icon from ASF.


  • Newbie
  • *
  • Offline Offline
  • Posts: 3
Re: Apache + PHP Installer
« Reply #2 on: Today at 01:10:51 PM »

I usually default the icon to the main executable. Is there a specific reason that using the main executable icon is not a good idea?

The alternative I have at hand would be the default installer Icon that you see with pretty much every installer.


  • Newbie
  • *
  • Offline Offline
  • Posts: 2
Re: Apache + PHP Installer
« Reply #3 on: Today at 02:29:12 PM »

As Mario said you should avoid.

Yes, be careful, the installer is not an Apache product, and that is not allowed by the Policy from the ASF.

 The feather graphics are trademarks of the ASF, and must not be used without appropriate attribution and permission from the ASF. Please see our formal Trademark Policy for more details. In particular, as a vendor-neutral public charity that provides independent governance to all Apache projects, you must use care when displaying the feather, and ensure it's clear that it's referring to the ASF as an independent organization.
Pages: [1]   Go Up

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13