Overview
Sometimes you need to quickly spin up a web server — to test a PHP app, share a local project with someone, or set up a target for practicing web exploitation. XAMPP gives you Apache + MySQL + PHP in one installer. LocalToNet gives you a public URL tunneling into your localhost, bypassing router NAT without any port forwarding config.
This combo is especially useful for security testing labs — spin up a vulnerable app locally, expose it temporarily, and tear it down when done.
Requirements
Step 1 — Install & Configure XAMPP
Download and install XAMPP
Grab the installer from apachefriends.org and run it. The defaults are fine — just make sure Apache and MySQL are checked.
Start Apache
Open the XAMPP Control Panel and click Start next to the Apache module. The status should turn green.
Test your local server
Visit http://localhost in your browser. You should see the XAMPP welcome page — that means Apache is running.
Place your files
Put your project files in the XAMPP document root:
windows pathC:\xampp\htdocs\your-project\
linux / mac path
/opt/lampp/htdocs/your-project/
Access your project at http://localhost/your-project/index.html (or .php).
If you're running PHP, make sure the file extension is .php — Apache needs to process it through the PHP interpreter, not serve it as static HTML.
Step 2 — Expose Localhost with LocalToNet
Sign up and download LocalToNet
Create a free account at localtonet.com, then download the LocalToNet client application for your OS.
Add LocalToNet to your PATH
Extract the binary and add its folder to your system's environment variables so you can run it from any terminal.
windows — add to PATH via PowerShell$env:PATH += ";C:\path\to\localtonet"
linux / mac — add to PATH
export PATH=$PATH:/path/to/localtonet
# Add the above line to ~/.bashrc or ~/.zshrc to persist it
Authenticate and connect
Open a terminal and run:
bashlocaltonet
When prompted, enter your AuthToken — find it in your LocalToNet dashboard under your account settings.
Create an HTTP tunnel
In the LocalToNet dashboard, go to My Tokens → HTTP tab → create a new tunnel. Point it at localhost:80 (XAMPP's Apache port).
Start the tunnel and LocalToNet will generate a public URL like https://abc123.localto.net.
Anyone with that URL can now access your local project from anywhere on the internet — no router config, no static IP needed.
Final Result
You now have a full local web server stack running on your machine, publicly accessible via a tunnel URL. This is useful for sharing work-in-progress projects, running vulnerable web apps for practice, or setting up temporary targets for penetration testing labs.
Don't leave tunnels open when not in use — especially if you're running intentionally vulnerable apps. Anyone with the URL can access your local server. Tear down the tunnel when you're done.