Solved Share 'localhost' over home wi-fi... how?

yankleber

IT Dinosaur
Member
VIP
Local time
6:15 PM
Messages
212
Location
Home
I have a localhost server set up on my desktop computer that I would like to share through my home wi-fi then I can access it from my mobiles.. I have no idea how to do that though. Any clue?

PS: My desktop computer where the localhost is has an wi-fi USB adapter.

Thanks!
 

My Computer My Computer

At a glance

Windows 7 Professional 64bitIntel i5-33308GBOnboard
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom
OS
Windows 7 Professional 64bit
CPU
Intel i5-3330
Motherboard
GigaByte B75M-D3H
Memory
8GB
Graphics Card(s)
Onboard
Sound Card
Behringer UCA222
Monitor(s) Displays
Samsung 22.5"
Screen Resolution
1920x1080
Hard Drives
SSD Kingston 120GB
HDD Samsung 320GB
Internet Speed
1M
Antivirus
ZoneAlarm FW + AV Free
Browser
Chrome
It may help people if you explained what sort of server you are running on your localhost: web (IIS/Apache), shoutcast, file server, DLNA server.......
 

My Computer My Computer

At a glance

Windows 11
Computer type
PC/Desktop
OS
Windows 11

My Computer My Computer

At a glance

Windows 7 Professional 64bitIntel i5-33308GBOnboard
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom
OS
Windows 7 Professional 64bit
CPU
Intel i5-3330
Motherboard
GigaByte B75M-D3H
Memory
8GB
Graphics Card(s)
Onboard
Sound Card
Behringer UCA222
Monitor(s) Displays
Samsung 22.5"
Screen Resolution
1920x1080
Hard Drives
SSD Kingston 120GB
HDD Samsung 320GB
Internet Speed
1M
Antivirus
ZoneAlarm FW + AV Free
Browser
Chrome
Sorry, I've never heard of that one before, hopefully somebody else will have.
 

My Computer My Computer

At a glance

Windows 11
Computer type
PC/Desktop
OS
Windows 11
Sorry, I've never heard of that one before, hopefully somebody else will have.

Well, actually I am an idiot because I just found that it has a 'sharing feature' that kind of works. I can see the localhost files listed on my mobile (through wi-fi) but when I tap the main HTML it hangs and after a long while I can see on Chrome debugger that it threw a couple 504 errors (I think that's because I am trying to load a .json extension file through JS). It is not a code issue as it works fine when I load it directly from http://127.0.0.1:81/. I tried to disable my firewall but had no luck.

:(

Would you recommend me a flexible and yet SIMPLE web server for Windows 7? My IIS stopped to work and I didn't have too much success with Apache either. I am a JS developer and am working on an HTML5 app with Phaser framework and everything I need is something to allow me to simulate an online server to test my code. Nothing fancy. Just that.
 

My Computer My Computer

At a glance

Windows 7 Professional 64bitIntel i5-33308GBOnboard
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom
OS
Windows 7 Professional 64bit
CPU
Intel i5-3330
Motherboard
GigaByte B75M-D3H
Memory
8GB
Graphics Card(s)
Onboard
Sound Card
Behringer UCA222
Monitor(s) Displays
Samsung 22.5"
Screen Resolution
1920x1080
Hard Drives
SSD Kingston 120GB
HDD Samsung 320GB
Internet Speed
1M
Antivirus
ZoneAlarm FW + AV Free
Browser
Chrome
Depending what you want to use it for there is a mini webserver which can be setup in 3 mins.tinyserver.sourceforge.net
 

My Computer My Computer

At a glance

win 8 32 bit
Computer type
PC/Desktop
OS
win 8 32 bit
Depending what you want to use it for there is a mini webserver which can be setup in 3 mins.tinyserver.sourceforge.net

Thank you... I tried it but unfortunately the packages seem to be all broken. :(
 

My Computer My Computer

At a glance

Windows 7 Professional 64bitIntel i5-33308GBOnboard
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom
OS
Windows 7 Professional 64bit
CPU
Intel i5-3330
Motherboard
GigaByte B75M-D3H
Memory
8GB
Graphics Card(s)
Onboard
Sound Card
Behringer UCA222
Monitor(s) Displays
Samsung 22.5"
Screen Resolution
1920x1080
Hard Drives
SSD Kingston 120GB
HDD Samsung 320GB
Internet Speed
1M
Antivirus
ZoneAlarm FW + AV Free
Browser
Chrome
Anyway, never mind! Someone in the HTML5 Dev Forum gave me the steps to do the trick and it was way easier than I supposed... I first figured the local IP of my desktop computer running the localhost. Then it was just to type in the local IP of my desktop computer on the browsers of my mobiles and they instantly found it through wi-fi!

:)
 

My Computer My Computer

At a glance

Windows 7 Professional 64bitIntel i5-33308GBOnboard
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom
OS
Windows 7 Professional 64bit
CPU
Intel i5-3330
Motherboard
GigaByte B75M-D3H
Memory
8GB
Graphics Card(s)
Onboard
Sound Card
Behringer UCA222
Monitor(s) Displays
Samsung 22.5"
Screen Resolution
1920x1080
Hard Drives
SSD Kingston 120GB
HDD Samsung 320GB
Internet Speed
1M
Antivirus
ZoneAlarm FW + AV Free
Browser
Chrome
"localhost" always refers to "this computer", the one making the connection, so by using localhost you'll only connect to the very same device, no matter what (127.0.0.1 is also equivalent). From a phone point of view, your computer is no longer "local", just another server in the network.

Just use the local IP of your computer as you've suggested (or its name could also work) and it'll work. For both your existing or any other web server.
I very doubt it, but if some JavaScript fails when accessing remotely, it could be a broken piece of code, hardcoding localhost.
 

My Computer My Computer

At a glance

Windows 7 Ultimate x64Intel Core i7-740QM8 GB DDR3NVIDIA GeForce 330GT
Computer type
Laptop
Computer Manufacturer/Model Number
Toshiba Sattelite A665-S6092
OS
Windows 7 Ultimate x64
CPU
Intel Core i7-740QM
Memory
8 GB DDR3
Graphics Card(s)
NVIDIA GeForce 330GT
Screen Resolution
1366x768
Hard Drives
Samsung 840 SSD 500GB
1TB USB3 external HD
Cooling
Coolermaster Notepal U3 notebook cooling pad
Internet Speed
3mbps ASDL
Antivirus
ClamWin 0.98.7
Browser
Opera 12.17 x86 (main), Firefox 38 (sec), IE11 (last resort)
Alejandro is correct. You have to enabling sharing on the server and access it on other computers using the server's ip and the application port. Don't forget that you might have to allow the port though windows firewall or any other firewall.
 

My Computers My Computers

  • At a glance

    Windows 7 pro/Windows 10 ProIntel i7 860 Quad core 2.8 ghz8 gbATI Radeon HD 5770 1 gb ram
    Computer type
    PC/Desktop
    Computer Manufacturer/Model Number
    HP Pavillion Elite HPE-250f
    OS
    Windows 7 pro/Windows 10 Pro
    CPU
    Intel i7 860 Quad core 2.8 ghz
    Memory
    8 gb
    Graphics Card(s)
    ATI Radeon HD 5770 1 gb ram
    Monitor(s) Displays
    Alienware 25 AW2521HF & Viewsonic
    Screen Resolution
    1920 x1080 & 1680x1050
    Hard Drives
    WD blue 1 tb & 500 gb.
    Browser
    FF of course.
    Other Info
    https://www.bestbuy.com/site/hp-pavilion-elite-desktop-intel-core-i7-processor-8gb-memory-1tb-hard-drive/9921493.p?skuId=9921493
  • At a glance

    Windows 2012 R2 Data center/Linux Minti3 9100 3.6GHz, 8M cache, 4C/4T8GB 2666MT/s DDR4 ECC UDIMM
    Computer type
    PC/Desktop
    System Manufacturer/Model Number
    Dell Poweredge T140
    OS
    Windows 2012 R2 Data center/Linux Mint
    CPU
    i3 9100 3.6GHz, 8M cache, 4C/4T
    Memory
    8GB 2666MT/s DDR4 ECC UDIMM
    Monitor(s) Displays
    Viewsonic
    Screen Resolution
    1680x1050
    Hard Drives
    1 TB & 750 GB
    Other Info
    https://www.dell.com/en-us/work/shop/productdetailstxn/poweredge-t140?~ck=bt
Back
Top