DevStackBoxDevStackBox

Environment & Networking

Ports, localhost binding, and network configuration.

On this page

DevStackBox - Networking Reference

Ports, conflicts, firewall behavior, and localhost configuration.


Default Ports

ServiceDefault PortConfig FileConfig Key
Apache HTTP80config/httpd.confListen 80
MySQL3306config/my.cnfport = 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:

ServiceHow to CheckHow to Stop
IIS (Internet Information Services)netstat -anoServices → IIS → Stop
World Wide Web Publishing ServiceTask Manager → Servicesnet stop W3SVC
Skype (older versions)Skype Settings → AdvancedUncheck "use port 80 and 443"
Windows 10/11 Device PortalCheck Settings → Developer ModeDisable Device Portal
Another XAMPP / WAMPCheck system trayStop the other stack

DevStackBox error message when port 80 is busy: Port 80 is not available. Another service may be using it.

Fix:

  1. Find what is using port 80: netstat -ano | findstr :80
  2. Note the PID in the last column
  3. Find the process: tasklist | findstr <PID>
  4. Stop that service
  5. Try starting Apache again

Or change Apache's port in config/httpd.conf:

Listen 8080

Note: changing the port means phpMyAdmin URL becomes http://localhost:8080/phpmyadmin/


Port 3306 Already in Use

Typical culprits:

ServiceHow to Stop
Another MySQL instanceStop it via Services or its own manager
Another XAMPPStop XAMPP MySQL
Docker MySQL containerdocker stop <container>

Fix:

netstat -ano | findstr :3306

Note PID, then:

tasklist | findstr <PID>

Or change MySQL's port in config/my.cnf:

[mysqld]
port = 3307

Note: 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:

  1. Open Windows Defender Firewall → Advanced Settings
  2. Find the blocked rule for httpd.exe or mysqld.exe
  3. 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-WebServer

Or just stop IIS temporarily:

net stop W3SVC
net stop WAS

Re-enable IIS later:

net start W3SVC

Accessing 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":

  1. Check MySQL is running (green status in DevStackBox)
  2. Check phpmyadmin/config.inc.php - $cfg['Servers'][$i]['host'] should be 127.0.0.1
  3. 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   localhost

This 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>"