You can use this page to prepare an Apache HTTP Server deployment for MDriven Server and MDriven Turnkey after both services are running on the host.
What Apache does in an MDriven deployment
Apache HTTP Server can be the public web-server entry point for an MDriven installation. The intended arrangement is that Apache receives browser traffic on standard web ports and forwards it to the locally running MDriven services.
The documented local installation uses these service endpoints:
| Service | Local endpoint | Purpose |
|---|---|---|
| MDriven Server | http://127.0.0.1:5010
|
The MDriven Server service. |
| MDriven Turnkey | http://127.0.0.1:5011
|
The MDriven Turnkey service. |
For example, before configuring Apache, a request to http://127.0.0.1:5010 on the server must reach MDriven Server. A request to http://127.0.0.1:5011 must reach MDriven Turnkey.
Choose the deployment path
Use the deployment guide that matches your server and web-server choice.
| Situation | Use this guide |
|---|---|
| Ubuntu or another Linux installation, with MDriven installed directly on the host | HowTos:Local Installation |
| Linux deployment with a documented reverse-proxy configuration | Documentation:Serving MDriven with Nginx Server as a Proxy |
| Production Docker deployment | Documentation:Deploying MDriven to Production with Nginx |
| Windows Server and IIS | Documentation:Deploying MDriven Server & Turnkey Core on IIS |
| macOS deployment | HowTos:Deploying on MacOs |
Prerequisites
Complete these checks before making Apache publicly accessible.
- Install and start MDriven Server and MDriven Turnkey by following HowTos:Local Installation.
- Install and start Apache HTTP Server on the host. The Apache installation and its operating-system service name depend on the operating system and package you use.
- Decide the public addresses that Apache will serve. A common arrangement uses one hostname for MDriven Server and a second hostname for MDriven Turnkey.
- Create DNS records for the chosen hostnames that point to the server's public IP address.
- Confirm that the host firewall and any network firewall permit public HTTP and HTTPS traffic to Apache.
- Keep the MDriven service ports private once Apache is confirmed as the public entry point. Apache should communicate with the MDriven services through their local endpoints.
Verify MDriven before configuring Apache
Do not diagnose an Apache proxy configuration until the MDriven services work locally. Run the following commands on the server:
sudo systemctl status mdrivenserver.service
sudo systemctl status mdriventurnkey.service
curl http://127.0.0.1:5010
curl http://127.0.0.1:5011
Both services must be running, and both curl commands must return a response. If either local request fails, resolve the MDriven service issue before continuing.
To inspect MDriven logs, use the log locations and commands in HowTos:Local Installation and Documentation:MDrivenServer log.
Apache configuration requirements
Configure Apache as a reverse proxy with separate public routes for MDriven Server and MDriven Turnkey. The exact Apache configuration must account for the Apache version and operating system in use.
Your configuration needs to meet all of these requirements:
- Forward requests for the MDriven Server public address to
http://127.0.0.1:5010. - Forward requests for the MDriven Turnkey public address to
http://127.0.0.1:5011. - Preserve the original host, client address, and request scheme as forwarded request information where Apache supports this configuration.
- Support connection upgrades required by the application. Verify WebSocket behavior in your environment.
- Use timeouts appropriate for application requests and connections.
- Define separate access and error logs so that Apache proxy failures can be distinguished from MDriven service failures.
- Validate Apache's configuration before reloading its service.
Important: This page does not provide Apache VirtualHost, proxy-module, WebSocket, or TLS directives because no verified Apache configuration is available in the supplied MDriven documentation. Do not copy an unverified configuration into a production environment.
Test the public route
After the Apache configuration has been reviewed and enabled:
- Check Apache's service status using the service-management command for your operating system.
- Test Apache's configuration with Apache's configuration-test command before reloading the service.
- Reload or restart Apache only after the configuration test succeeds.
- Open the public MDriven Server URL in a browser and verify that it reaches the MDriven Server application.
- Open the public MDriven Turnkey URL in a browser and verify that it reaches the MDriven Turnkey application.
- Test the same URLs over HTTPS after TLS has been configured.
If the public URL fails but the corresponding local curl command succeeds, investigate the Apache virtual-host selection, proxy target, firewall rules, DNS, and Apache error log. If the local curl command fails, investigate MDriven Server or MDriven Turnkey instead.
Security and exposure
When Apache is the public entry point, expose Apache's HTTP and HTTPS ports as required by your deployment. Do not leave ports 5010 and 5011 publicly open after you have verified that Apache forwards requests correctly. Apache can reach the services locally through 127.0.0.1.
Use HTTPS for production access. Certificate issuance, renewal, and Apache-specific TLS configuration must be selected and maintained for your operating system and Apache installation.
Troubleshooting checklist
| Symptom | Check |
|---|---|
| Apache cannot reach MDriven Server | Run curl http://127.0.0.1:5010 on the server and check mdrivenserver.service status.
|
| Apache cannot reach MDriven Turnkey | Run curl http://127.0.0.1:5011 on the server and check mdriventurnkey.service status.
|
| A public hostname shows the wrong application | Check the Apache virtual-host hostname selection and confirm that each public address forwards to the intended local port. |
| The application works locally but not from the internet | Check DNS, the server firewall, network firewall rules, Apache service status, and Apache error logs. |
| The application works over HTTP but not HTTPS | Check the Apache TLS configuration, certificate assignment, and access to the HTTPS port. |
| Connections requiring upgrades fail | Verify Apache's WebSocket and connection-upgrade handling for the installed version and configuration. |
