I have successfully hosted database with xampp
https://stackoverflow.com/a/48990347/15493370
This is the link which I followed. Now It works fine but there is one problem. I want the database to be hosted in 192.168.100.2:8080 forever. How can I do that?
Suppose my current Ip is 192.168.100.59.
On using ipconfig
Wireless LAN adapter Wi-Fi:
Connection-specific DNS Suffix . :
IPv4 Address. . . . . . . . . . . : 192.168.100.59
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : fe80::1%12
192.168.100.1
I have not included ipv6 as it is not used anywhere.
I tried using IP 192.168.100.2 in the httpd.conf file. It still listens to 192.168.100.59 not what I want.
So my question is How can I make it host to fixed private Ip in LAN at any time
Or
Will it change overtime
If so how can I solve this problem. (I am not connecting different networks just single network )
You have to statically set your ip address so when your pc/server restarts/reboots it doesn't change its ip.
Alternatively you can create a static lease on dhcp server based on your server's mac address and always assign the same ip to that mac.
Related
I have an apache server on windows machine , in the same network there is many other machines containing servers also ..
When I try to check the network connectivity usin ping -t GATEWAY_IP , it shows a lot of loss , but when I shutdown the apache server it becomes regular .
I know that ping has nothing to do with apache , but I cant explain that strange thing actually .
So, What can the problem be ?
Does anyone know how to transfer a file from my vagrant VM to my host machine?
Heres what I'm trying but its not working for me - No errors but the file is not appearing:
scp -i /Users/myuser/path/mypath/.vagrant/machines/proj/virtualbox/private_key -P 2222 vagrant#127.0.0.1:/home/vagrant/database.sql
I have also tried this:
scp -P 2222 vagrant#127.0.0.1:/home/vagrant/database.sql .
And I get the error 'scp: .: not a regular file type'
Why are you trying to transfer from 127.0.0.1? That is always the IP of the machine you are currently on, so in this case the VM itself. So you are trying to do a local copy, essentially the same as cp /home/vagrant/database.sql .
You need to use an actual IP address of the host system for this to work, not 127.0.0.1 or any other of the 127.x.x.x. local loopback addresses
I am trying to setup a cluster. I have 2 laptops in my LAN.
Laptop 1 windows VM with hyperv enable
Laptop 2 running ubuntu on bare metal.
In laptop 1, I created a VM (ubuntu) using hyperv with default switch. Now I am trying to connect from laptop2 to vm running in laptop 1, but ping doesn't reach the vm.
On the other hand, hyperv vm is able to connect with laptop 2.
I have disabled firewall in hyperv vm and laptop 2.
Could somebody please help me setup network such that connection in both direction is possible? Below are ip addresses details in cases needed.
Laptop 1 host IP details
Wireless LAN adapter Wi-Fi:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::d0aa:e43:2164:18c8%21
IPv4 Address. . . . . . . . . . . : 192.168.1.73
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.254
Laptop 1 hyperv switch IP details:
Ethernet adapter vEthernet (Default Switch):
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::718d:fd08:76a:c25a%54
IPv4 Address. . . . . . . . . . . : 192.168.35.129
Subnet Mask . . . . . . . . . . . : 255.255.255.240
Default Gateway . . . . . . . . . :
Laptop 1 Hyper v based ubuntu VM IP details:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.35.139 netmask 255.255.255.240 broadcast 192.168.35.143
Laptop 2 IP detail
wlp13s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.83 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::42eb:609b:b991:7db4 prefixlen 64 scopeid 0x20<link>
I have made a "webserver" in vb.net the problem is that it seems like it's just listening to 127.0.0.1 (localhost) and not request that is sent over the internet. I have changed the listening adress to my public internet ip but it's still just listening to local requests.
Do someone have a source code with a working example of how this could be accomplished?
Dim address As IPAddress = IPAddress.Parse(79.138.xxx.xxx)
Dim EndPoint As IPEndPoint = New IPEndPoint(address,8082)
Dim ss As Socket = New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
ss.Bind(EndPoint)
ss.Listen(20)
Are you behind any kind of network? This includes a router from your ISP, or generally any hardware other than the simplest of modems.
Easy way to tell would be to do an IPCONFIG and see what your local IP address is set to. To do so, open a command prompt, and enter: ipconfig /all
My output, as an example, is this:
Wireless LAN adapter Wireless Network Connection:
Connection-specific DNS Suffix . : home
Description . . . . . . . . . . . : Intel(R) WiFi Link 5100 AGN
Physical Address. . . . . . . . . : 00-22-FB-8A-59-8E
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 192.168.1.2 (Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : Monday, December 27, 2010 7:50:12 PM
Lease Expires . . . . . . . . . . : Tuesday, December 28, 2010 9:13:01 PM
Default Gateway . . . . . . . . . : 192.168.1.1
DHCP Server . . . . . . . . . . . : 192.168.1.1
DNS Servers . . . . . . . . . . . : 192.168.1.1
68.238.0.12
NetBIOS over Tcpip. . . . . . . . : Enabled
This tell me that the IP address of my computer is 192.168.1.2, which is far different than that of my public internet connection, due to being behind a router.
If this is the case, you'll need to open a path from the public world to your specific IP address behind your hardware. This is usually referred to as Port Forwarding or similar, and would be configured in your router/firewall.
Also, as a doublecheck, do you have software firewalls disabled?
My hosting environment using Server version: Apache/2.2.14 (Unix) and I am modifying
./usr/local/apache/conf/httpd.conf to set environment variable and restarting the server .
SetEnv XML-RPC-IPs 193.45.32.21
I did set it as a first entry in the file and restarted the server . But even restarting if I try to print it is still getting me black , Am I missing any thing ?
echo "My IP address ".$_SERVER['XML-RPC-IPs'];
Thanks for your help
Regards
Kiran
Environmental Variables are located in $_ENV superglobal.
What you are looking for is echo "My IP address ".$_ENV['XML-RPC-IPs'];