61 lines
1.4 KiB
Markdown
61 lines
1.4 KiB
Markdown
|
|
# How to Access from Windows
|
||
|
|
|
||
|
|
## The Problem
|
||
|
|
|
||
|
|
When you type "localhost" in Firefox on Windows, you're accessing WINDOWS' localhost, not the Linux server!
|
||
|
|
|
||
|
|
The Linux server has NO website on port 80 (it's completely deleted).
|
||
|
|
|
||
|
|
## The Solution
|
||
|
|
|
||
|
|
### Option 1: Use Port 5000 (Recommended for Development)
|
||
|
|
```
|
||
|
|
http://localhost:5000/
|
||
|
|
```
|
||
|
|
|
||
|
|
### Option 2: Use the Server's IP Address
|
||
|
|
```
|
||
|
|
http://192.168.10.130:5000/
|
||
|
|
```
|
||
|
|
|
||
|
|
### Option 3: Setup Port Forwarding (If you really want port 80)
|
||
|
|
|
||
|
|
On Windows, open PowerShell as Administrator and run:
|
||
|
|
```powershell
|
||
|
|
netsh interface portproxy add v4tov4 listenport=80 listenaddress=0.0.0.0 connectport=5000 connectaddress=192.168.10.130
|
||
|
|
```
|
||
|
|
|
||
|
|
Then you can use:
|
||
|
|
```
|
||
|
|
http://localhost/
|
||
|
|
```
|
||
|
|
|
||
|
|
To remove it later:
|
||
|
|
```powershell
|
||
|
|
netsh interface portproxy delete v4tov4 listenport=80 listenaddress=0.0.0.0
|
||
|
|
```
|
||
|
|
|
||
|
|
## Why This Happens
|
||
|
|
|
||
|
|
- **Windows**: Has its own "localhost" (127.0.0.1)
|
||
|
|
- **Linux Server**: Different machine at 192.168.10.130
|
||
|
|
- **Firefox on Windows**: Looks at Windows localhost, not Linux
|
||
|
|
|
||
|
|
## Correct URLs
|
||
|
|
|
||
|
|
### ✅ CORRECT:
|
||
|
|
- `http://localhost:5000/` (Windows forwards to Linux)
|
||
|
|
- `http://192.168.10.130:5000/` (Direct to Linux)
|
||
|
|
|
||
|
|
### ❌ WRONG:
|
||
|
|
- `http://localhost/` (This is Windows localhost, not Linux!)
|
||
|
|
- `http://localhost:80/` (Same problem)
|
||
|
|
|
||
|
|
## Quick Test
|
||
|
|
|
||
|
|
Open Firefox and try BOTH:
|
||
|
|
1. `http://localhost:5000/` - Should work
|
||
|
|
2. `http://192.168.10.130:5000/` - Should work
|
||
|
|
|
||
|
|
If neither works, there might be a firewall blocking port 5000.
|