Network Setup Guide - localhost to IP
Complete Instructions for LAN IP Configuration (172.16.16.200)
i About This Guide
- Step-by-step instructions to set up Gate Register on office network
- Configure XAMPP to use LAN IP: 172.16.16.200 Your Server IP
- Access Gate Register from any computer on the same network
- Includes firewall configuration, auto-start setup, and troubleshooting
📌 Server PC Information:
• IP Address: 172.16.16.200
• Port: 80
• Access URL: http://172.16.16.200/gate_register/inout.php
• XAMPP Installation: C:\xampp
• Project Folder: C:\xampp\htdocs\gate_register\
1 Find Your Server PC's IP Address
ipconfig
Expected output: 172.16.16.200 (as shown in your ipconfig)
2 Configure XAMPP Apache to Use LAN IP
📁 File Location: C:\xampp\apache\conf\httpd.conf
Find these lines (around line 45-50 and 100-105) and change them:
Listen 172.16.16.200:80
ServerName 172.16.16.200:80
3 Configure Windows Firewall
netsh advfirewall firewall add rule name="Apache HTTP Server" dir=in action=allow protocol=TCP localport=80
1. Press Windows + R, type firewall.cpl and press Enter
2. Click Inbound Rules → New Rule
3. Select Port → Next
4. Select TCP → Specific local ports: 80 → Next
5. Select Allow the connection → Next
6. Check all three boxes (Domain, Private, Public) → Next
7. Name: Gate Register Apache → Finish
4 Update Database Configuration (config.php)
$db_host = '172.16.16.200';
<?php
$db_host = '172.16.16.200';
$db_user = 'root';
$db_password = '';
$db_name = 'gate_register';
$conn = mysqli_connect($db_host, $db_user, $db_password, $db_name);
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
?>
5 Set Network Profile to Private
⚠️ Important: Network must be set to "Private" to allow other computers to connect.
6 Test on Server PC
http://172.16.16.200/gate_register/inout.php
✅ If the page opens, the server is configured correctly.
✅ Also test: http://localhost/gate_register/inout.php (should also work)
7 Create Auto-Start Batch File (Server PC)
@echo off
timeout /t 5 /nobreak >nul
start chrome http://172.16.16.200/gate_register/inout.php
exit
Press
Windows + R → type shell:startup → paste the batch file there.8 Set XAMPP to Start Automatically
1. Open XAMPP Control Panel as Administrator
2. Click on Config (top right corner)
3. Check Autostart for Apache
4. Click Save
5. Also install Apache as Windows service: Click on Apache → Install Service
9 Access from Another PC (Client)
http://172.16.16.200/gate_register/inout.php
✅ Client Requirements:
• Must be on same network (172.16.16.x)
• No installation needed - just a web browser
• Can access from any device (Windows, Mac, Android, iPad)
10 Create Desktop Shortcut on Client PC
http://172.16.16.200/gate_register/inout.php
11 Troubleshooting
🔧 If Client PC cannot connect:
• Test 1: Ping the server - ping 172.16.16.200
• Test 2: Check client IP - run ipconfig - must start with 172.16.16.x
• Test 3: Temporarily disable firewall on server to test
• Test 4: Restart XAMPP Apache
• Test 5: Check if Apache is listening: netstat -an | find ":80"
• Test 6: Verify httpd.conf has Listen 172.16.16.200:80
ping 172.16.16.200
netstat -an | find ":80"
12 Access from Mobile/Tablet
http://172.16.16.200/gate_register/inout.php
📱 The interface is responsive and works on mobile devices!
✓ Summary Checklist
- ☐ Found server IP address (172.16.16.200)
- ☐ Changed Apache Listen to 172.16.16.200:80 in httpd.conf
- ☐ Changed Apache ServerName to 172.16.16.200:80 in httpd.conf
- ☐ Restarted Apache from XAMPP Control Panel
- ☐ Added Windows Firewall rule for port 80
- ☐ Updated config.php with $db_host = '172.16.16.200'
- ☐ Set network profile to Private
- ☐ Tested on server: http://172.16.16.200/gate_register/inout.php
- ☐ Client PC on same network (172.16.16.x)
- ☐ Client PC can access the URL
- ☐ Created shortcut on client desktop
- ☐ (Optional) Set XAMPP to auto-start with Windows
🎉 Once completed, the Gate Register will be accessible from any computer on your office network!
Access URL: http://172.16.16.200/gate_register/inout.php
Admin Credentials: Username: Admin | Password: Admin
!doctype>
0 Comments
Please do not enter any spam link in the box