How to make my localhost-server accessible for others on my WiFi - apache

I am currently on a mac using the pre-installed Apache server.
Now I need to cross-browser test some websites, and therefore I need to access my pages on some other computers. How can I make my localhost-sites accessible for other computers on my WiFi (without uploading to another server)?
Thanks in advance.

Apache server's default configuration should allow other computers (even ones not on your local network) to access whatever it's serving up.
You can access your server from another machine by using the IP address of your server. You can find the IP address of your server by finding a console (this works in Windows and Mac machines) and typing in "ipconfig". (For linux machines, it's "ifconfig".)

Related

Connecting a DVR Tuner to a Plex Server in Hyper-V

is there a way to connect a dvr tuner to a Plex Server hosted in Hyper-V?
I have searched but could not find a Question about this topic.
My build is a Win22 Datacenter Server running Plex in Hyper-V. A Hauppauge dualHD is connected to the Win22 Datacenter Server via USB.
Thanks for your help!
Current Answer
I'm updating my answer as I didn't realize it was a tuner and not a DVR box connected to your TV.
From what I'm seeing online, your best bets are:
use Enhanced Session Mode to connect the device over RDP (which only supports some devices)
use a third-party tool such as Donglify (this is from results on Google. Buy at your own digression) to allow USB passthrough
use a Type 2 hypervisor (VirtualBox, VMware) to run your instance of Plex instead
run Plex outside of Hyper-V on the same system with a sandboxed user
run Plex on another device entirely, such as a Raspberry Pi.
I can't help with the first, as it requires some gpedit.msc magic I cannot do, or second as I have never used one.
3rd option will reduce program speeds which may cause slowdown if multiple people stream at once.
4th option is my personal recommendation, as you bypass the need to use a hypervisor entirely and keep on the same device.
5th is only good if you use a USB-based drive and have a decent bit of experience with Linux.
Old Answer
Kept for the sake of archival.
You'll want to use Powershell and the Add-NetNatStaticMapping cmdlet to allow inbound connections to the Hyper-V server. This will need a vNAT adapter set up. See the linked blog post (not mine) if you need help with that, too.
Assuming the vEthernet connection has an internal IP of 192.168.10.2 and a NAT network name of NATSwitch, with Plex on the default port of 32400:
Add-NetNatStaticMapping -ExternalIPAddress "0.0.0.0/24" -ExternalPort 32400 -Protocol TCP -InternalIPAddress "192.168.10.2" -InternalPort 32400 -NatName NATNetwork
You will most likely need to replace the internal IP, port, and NAT name.
After this is set up, you'll need to point your DVR to the IP of the Windows Server box.
Sites referenced:
Plex support page on ports to forward
A GitHub user's blog, specifically a post on port forwarding

How could I access my VM in my host machine (By different IP)?

I want to access the virtual machine IP in the host (by ping or curl or something), but it is not ok. How could I make it?
The host machine is a win10 PC.
A virtual machine using VMware workstation 15, Ubuntu 16.04 server. It has IP address 192.168.178.138 and 10.0.0.11. I can access the 192.168.178.138, but cannot access 10.0.0.11. (no matter ping or curl...)
All are NAT mode in VMware Workstation.
Now I have a web application running on 10.0.0.11:80. How could I access it in my host machine.
Btw I have another VM with 192.168.178.39 and 10.0.0.31, and this VM can access the 10.0.0.11:80 by curl.
I can show the topo as below.
(A little Chinese but it won't affect reading, just ignore it)
Yes, now I solve this question by myself.
It seems that you cannot use the Host-only mode (Actually I can only use this mode...).
You need to set the virtual interface in your host PC (The IP, gateway, or anything else...);
Then you need to set in the VMWare workstation, set it to use speical lan (VM net 2 for me);
Then you can access it from the host machine and other vm, maybe you need to search something like NAT translation in VMWare workstation to access your web application deployed in the VM from outer network.
That's what I do, now I can access my horizon dashboard in the browser (The Ubuntu server don't have any browser... T-T sad ...)
Settings Picture

Cant access internal http server via mobile device

I am running an Apache server (WAMP .- Windows / Apache / MySQL / PHP installation).
I am running a HTTP server for some development I am doing. This project involves comunicating with a HTTP server running Firebird.
Now, all is well until I try use the external IP address from a mobile device to access the server. Then it just times out.
I have correctly setup port-forwarding on the router and everything is accessible from ANY other computer. So the url goes something like this..
http://70.12.123/scriptToRun.php
To test this, I have connected from another computer on the LAN and it connects fine. I have used Teamviewer and connected from a computer NOT on the LAN. That also connects fine.
However, whenever I try to use the same url from a mobile device (phone) it just times out.
Anyone have any ideas why I cant connect using a mobile ?
Dave

Why can't my friends access my website built with Apache2?

So, I have been building this website with HTML and I decided to host it with on Apache2. It runs on an Ubuntu and me already changed the VM assigned Ip, which is 10.2.0.15, into another one. I can access it on the Mac where the VM is, but I asked my friend if he can open it, and he said it was a 404 Server not found error.
Please help!
You probably need to enable port forwarding:
https://www.howtogeek.com/122641/how-to-forward-ports-to-a-virtual-machine-and-use-it-as-a-server/
You haven't indicated what VM software you are using, but the above is for VirtualBox. VMware is a bit different. Also make sure your router is not blocking any packets or any firewall.

HTTP Server on iPhone that Supports Public Network?

I'm currently using cocoahttpserver to do some file sharing thing in my iPhone app. Does anyone know how to use public IP address to connect to the phone, that is to use the Internet, rather than internal connection via WiFi.
Any help would be appreciated! Thanks in advance.
Some thoughts on running an HTTP server on an iPhone:
Most of the time, with IPv4 addresses, the IP address is what is known as a “NAT” address. Simply put, the address it uses can only be accessed from other computers on the same network. It usually can not be accessed from the internet at large.
IPs can can be accessed from the internet at large cost quite a bit of money to have. They do not exist for wireless 3G networks.
Web servers like Apache and lighthttpd compile and run fine on an iPhone. However, the iPhone needs to be jailbroken before running these servers (but there appears to be a web server app for the iPhone)
Apache needs text files to be edited to be configured. It’s a great web server, but people who want to use it better be comfortable reading documentation and editing text files by hand.