Browse documentation
Environment & Networking
Ports, localhost binding, and network configuration.
On this page
DevStackBox - Networking Reference
Ports, conflicts, firewall behavior, and localhost configuration.
Default Ports
| Service | Default Port | Config File | Config Key |
|---|---|---|---|
| Apache HTTP | 80 | config/httpd.conf | Listen 80 |
| MySQL | 3306 | config/my.cnf | port = 3306 |
| phpMyAdmin | (served through Apache on port 80) | - | - |
Binding Behavior
By default, all services bind to 127.0.0.1 (loopback) only.
This means:
- Services are accessible from your machine only
- Services are NOT exposed to your local network or internet
- This is intentional for a local dev environment
Do NOT change bind addresses unless you know the security implications. See SECURITY.md.
Common Port Conflicts
Port 80 Already in Use
Port 80 is blocked when another service is running on it.
Typical culprits on Windows:
| Service | How to Check | How to Stop |
|---|---|---|
| IIS (Internet Information Services) | netstat -ano | Services → IIS → Stop |
| World Wide Web Publishing Service | Task Manager → Services | net stop W3SVC |
| Skype (older versions) | Skype Settings → Advanced | Uncheck "use port 80 and 443" |
| Windows 10/11 Device Portal | Check Settings → Developer Mode | Disable Device Portal |
| Another XAMPP / WAMP | Check system tray | Stop the other stack |
DevStackBox error message when port 80 is busy: Port 80 is not available. Another service may be using it.
Fix:
- Find what is using port 80:
netstat -ano | findstr :80 - Note the PID in the last column
- Find the process:
tasklist | findstr <PID> - Stop that service
- Try starting Apache again
Or change Apache's port in config/httpd.conf:
Listen 8080Note: changing the port means phpMyAdmin URL becomes http://localhost:8080/phpmyadmin/
Port 3306 Already in Use
Typical culprits:
| Service | How to Stop |
|---|---|
| Another MySQL instance | Stop it via Services or its own manager |
| Another XAMPP | Stop XAMPP MySQL |
| Docker MySQL container | docker stop <container> |
Fix:
netstat -ano | findstr :3306Note PID, then:
tasklist | findstr <PID>Or change MySQL's port in config/my.cnf:
[mysqld]
port = 3307Note: changing the port means you must connect phpMyAdmin to the new port.
Firewall Behavior
Windows Defender Firewall may prompt to allow Apache and MySQL on first launch.
Expected behavior:
- First time Apache starts: Windows Firewall dialog asks "Allow httpd.exe to communicate on network?"
- Click "Allow access" - only for Private networks, NOT public networks
- Same for MySQL's
mysqld.exe
If you accidentally deny the firewall prompt:
- Open Windows Defender Firewall → Advanced Settings
- Find the blocked rule for
httpd.exeormysqld.exe - Enable it
IIS Conflict (Common on Developer Machines)
IIS (Internet Information Services) is common on Windows developer machines and directly conflicts with Apache on port 80.
Disable IIS completely:
# Run as Administrator
Disable-WindowsOptionalFeature -Online -FeatureName IIS-WebServerOr just stop IIS temporarily:
net stop W3SVC
net stop WASRe-enable IIS later:
net start W3SVCAccessing phpMyAdmin
URL: http://localhost/phpmyadmin/
Default credentials:
- Username:
root - Password: (empty)
DevStackBox ships phpmyadmin/config.inc.php with AllowNoPassword enabled for this local default. If login says "Login without a password is forbidden", restart the app once (it recreates a missing config) or reinstall from the latest release.
If phpMyAdmin shows "Cannot connect to MySQL server":
- Check MySQL is running (green status in DevStackBox)
- Check
phpmyadmin/config.inc.php-$cfg['Servers'][$i]['host']should be127.0.0.1 - Check MySQL port is 3306 (default)
Localhost DNS Behavior
localhost resolves to 127.0.0.1 via the Windows hosts file:
127.0.0.1 localhostThis file is at: C:\Windows\System32\drivers\etc\hosts
DevStackBox does NOT modify this file unless you use the virtual hosts feature (Phase 3). The base localhost always works via Windows default.
Virtual hosts
Virtual-host management is available in the app. Add a local domain and document root from the Apache workspace. Updating the Windows hosts file requires elevation. Review the requested changes before accepting a UAC prompt.
HTTPS / SSL
Localhost SSL is available through the app's SSL controls. DevStackBox creates a local CA and localhost certificate; trusting the CA in Windows is a separate user action. Per-virtual-host HTTPS remains planned. See Feature status for current scope.
Network Diagnostics
Quick commands to check port state from PowerShell:
# Check what is listening on port 80
netstat -ano | findstr ":80 "
# Check what is listening on port 3306
netstat -ano | findstr ":3306 "
# List all listening TCP ports
netstat -an | findstr LISTENING
# Find which process owns a PID
tasklist /FI "PID eq <PID>"