Skip to main content
Apache is the web server at the heart of Bearsampp. It listens for HTTP and HTTPS requests and serves your PHP applications and static files from the www/ folder. Every time you start Bearsampp, Apache starts automatically as a Windows service and stays running in the background.

How Apache works in Bearsampp

Apache runs as a Windows service named bearsamppapache. It handles both plain HTTP traffic and HTTPS (SSL) traffic on separate ports. Bearsampp manages the service lifecycle for you — you start, stop, and restart it from the tray menu rather than from the command line.

Default ports

ProtocolDefault port
HTTP80
HTTPS (SSL)443
If another application on your machine already uses port 80 or 443, Apache will fail to start. Use Change port from the tray menu to assign a free port.

Configuration file

The main Apache configuration file is located at:
bin/apache/apacheX.X.X/conf/httpd.conf
Replace apacheX.X.X with the version you have installed (for example, apache2.4.62). Bearsampp rewrites parts of this file automatically when you change settings through the tray menu, so always use the tray menu for port and module changes rather than editing the file directly when possible.

Tray menu options

Right-click the Bearsampp icon in the system tray, then select Apache to access the following options:

Start / Stop / Restart service

Control the Apache Windows service without restarting all of Bearsampp.

Change port

Switch Apache to a different HTTP port. Bearsampp updates httpd.conf and restarts the service.

Access logs

Open the Apache access log to see all incoming requests.

Error logs

Open the Apache error log to diagnose startup failures and runtime errors.

Edit conf

Open httpd.conf in your default text editor.

Check port

Verify whether the configured HTTP port is free or already in use.

Generate SSL certificate

Create a self-signed SSL certificate for local HTTPS development.

Add virtual host

Create a new Apache virtual host for a custom local domain.

Add alias

Map a URL path (for example, /myapp) to a folder anywhere on your machine.

Enabling and disabling Apache modules

Apache ships with many optional modules — mod_rewrite, mod_headers, mod_ssl, and more. You can toggle individual modules on or off without editing httpd.conf by hand:
1

Open the Apache modules menu

Right-click the tray icon → ApacheModules.
2

Toggle a module

Click a module name to enable or disable it. A checkmark indicates the module is currently active.
3

Restart Apache

Bearsampp restarts the Apache service automatically so the change takes effect immediately.

Switching Apache versions

Bearsampp supports multiple Apache versions. To switch:
1

Open the versions menu

Right-click the tray icon → ApacheVersions.
2

Select a version

Click the version you want. Bearsampp stops the current Apache service, updates configuration, and starts the new version.
Not every Apache version is compatible with every PHP version. If you see a compatibility warning after switching, check that your active PHP version supports the Apache version you selected.

SSL / HTTPS

To use HTTPS locally, generate a self-signed certificate from the tray menu (ApacheGenerate SSL certificate). Your browser will show a security warning for self-signed certificates — you can safely accept it for local development. The SSL configuration lives in:
bin/apache/apacheX.X.X/conf/extra/httpd-ssl.conf

Virtual hosts and aliases

  • Virtual hosts let you access projects at a custom domain like myproject.local instead of http://localhost/myproject. Add them via ApacheAdd a virtual host.
  • Aliases map a URL path to any folder on your machine. Add them via ApacheAdd an alias.
After adding a virtual host, use the HostsEditor tool (tray → Tools → HostsEditor) to add the domain to your Windows hosts file so your browser can resolve it.

Service details

PropertyValue
Service namebearsamppapache
Start modeAutomatic (on Bearsampp launch)
Config filebin/apache/apacheX.X.X/conf/httpd.conf