I want to access my website hosted on local machine on htdocs in xampp, I want to access it using an IP address, How can I get it where like:
https://locahost/
and can I get using an IP address?
can you help me the best tutorial link easy step by step to make it on window 10?
http://localhost:port like http://localhost:8080 i think. You need to specify a port.
You can access your XAMPP website using the following web addresses in the device it is hosted on, usually:
http://127.0.0.1:80
And
http://localhost:80
To access your website from your smartphone or another PC, you will need to access it using your local IP address assigned from your router. Run ipconfig to see it:
You will need to find the line in the output, like: IPv4 Address.........: 192.168.0.123
For port 80 and 443, you do not need to type the number after the address, i.e. :80 or :443. If you are using other ports, you will need to specify them.
Related
I am trying to setup a LAMP environment on my laptop with Ubuntu 18.04.
I have no experience real previous experience with this and all tutorials i find are just a step for step guide on how to setup, but none explain what you are exactly doing.
So I don't know why I am having this problem.
After installing all parts of LAMP I can access localhost, and I see the apache default page.
But if I try to go to my IPaddress, (the ipaddress I found with curl -4 icanhazip.com) the page loads for a while and then tells me this:
Firefox can’t establish a connection to the server at 213.127.26.xxx
So my question is am I using the right IPaddress and how can I make apache work from my IPaddress? Because phpmyadmin will not work on localhost.
The issue is likely that your local ports (i imagine your web server is running on port 80 or 8080) are not being forwarded through your router. Your router likely uses something called “NAT (network address translation)” to expose all of the internal IP addresses on your network through a single “public” IP address, in your case 213.x.x.x (you should never post this here unless you’re 100% positive your network is secure!). Your router needs to be configured to forward port 80 on 213.x.x.x to your machine’s “internal” ip address, likely something like “192.168.x.x” or “10.0.x.x”. A search for “port forwarding ” should help you out
Alternatively, ngrok is a nice free tool which you can use to expose your port on a public address. By running nginx http 80, it will provide you with a temporary url where you can reach your site (on a free plan, it will only provide you that url for one day, so you will need to re-run it)
First, you have to find out on which ports your server is running.
After that, you have to go into your router's settings and add port forwarding entries for these ports, to make sure that your router forwards the requests to the right device.
I have developed a web app using laravel & apache 2.4 in ubuntu 15.04 inside vmware. I have configured ip address of the ubuntu as static which is 192.168.1.250.
Within ubuntu i can access the web app from ip 127.0.0.1 or localhost. And from the networked devices, i can access it using the ubuntu's ip address 192.168.1.250.
Now, i want to access the web app using a domain name from the networked devices instead of IP address. I think i need to install and configure dns server in ubuntu along with apache. So, i installed BIND dns and tried to configure it but failed. So, if it can be done with BIND, then i was wondering HOW? If not, then what may be another way? Thank you !
You can create a tunnel to your local environment by using ngrok which will give you a temporary address (to keep the address static you have to use pro features a.k.a paid features)
Follow this steps:
Download ngrok and unzip ngrok
Open a cmd / terminal and navigate to ngrok location
Type the following command:
ngrok http {your_localhost_server_port_number}
It will create the tunnel but we need to point a virtual host to it so edit your local server virtual host and add an alias / server name like following:
NOTE: if you only have one app running on your local server this step is optional
*.ngrok.io
Now restart your local server to load our new configuration
Now you are able to see your localhost site online by using the ngrok provided url.
Enjoy!
I set up my pi to broadcast it's own "wifi" and I have an Apache server running on it.
I used this tutorial https://learn.adafruit.com/setting-up-a-raspberry-pi-as-a-wifi-access-point
I can currently connect to the network that the pi is broadcasting and go to the ip of the server on my phone and it brings up the webpage, but I want to be able to type in "mydomain.net" and have it bring me to the webpage. Can anyone help me with this or suggest anything?
I want anyone that wants to connect to this local wifi (not worldwide) to be able to enter the website so changing everyone's host file is not going to happen.
you can modify /etc/hosts file on your local machine to point the custom domain name to the IP address of the environment you want to test. The /etc/hosts file contains a mapping of IP addresses to URLs.
Your browser uses entries in the /etc/hosts file to override the IP-address-to-URL mapping returned by a DNS server.
This is only useful for testing DNS (domain name system) changes and the SSL configuration before making a website live.
I have few PCs in same network. One of the machines (ip: 192.168.1.110) is already hosting a WAMP server which is accessible through an external IP. I now want to install WAMP server on one more machine (ip: 192.168.1.120) and make it accessible through external link. But this new machine is not getting accessed through external link. Is there any configuration related stuff that I need to do in httpd.conf file to make it happen?
There are a number of issues with your idea of using a second PC running a second WAMPServer. Not that 2 machines and 2 WAMPServers is a problem.
First, I assume your router has already had port 80 "Port Forwarded" to the original PC's IpAddress (ip: 192.168.1.110). It cannot be forwarded to 2 different internal IP addresses, unless you tell people to use a different port number for the second sites domain name so that you can forward that other port to your second PC's port 80.
This leaves you a couple of possibilities :-
You either setup the original PC's Apache as a Proxy for the second PC and therefore forward accesses for the second site to the second PC while still running the first site on the first PC
Or, more simply in my opinion you stay with One PC running WAMPServer and you make use of Apache's Virtual Hosts capabilities.
This way as long as you have 2 seperate domain names, both pointing to your Routers WAN IP address both can still use port 80 i.e. Users dont need to add a port number. Apache will decide what site is required and run that site by simply looking at the domain name and redirecting everything to the right place.
See this post for some help on how to setup Virtual Hosts in WAMPServer
Its should only take a few minutes to setup.
I can point a url to a directory in my computer by setting /etc/host and /private/etc/apache2/extra/httpd-vhosts.conf files. For instance, when i type sample-app.com in my computer, website under /Users/azad/works/sample-app.com folder is running.
When someone type sample-app.com in another computer in same local network i want to display the same website located on my computer. Is this possible?
By the way, i don't have access to any computer in the local network and i can't do any configuration.
Mac 10.7.5 (I am using mac but if windows is better for this purpose i can use windows too),
PHP 5.3,
Apache 2.2
If you want to accomplish this on windows, use the hosts file on the computers you want to point at that sample-app.com URL mapping your IP address to that URL in all the computers you want that to work on. Then make sure your HTTP server is configured to serve that website under that host name for port 80.
Since you aren't able to configure the local network, the best way to handle this situation is to configure a host name with the website domain's DNS server, such as dev.sample-app.com, which points to the local IP address (seeing as how its on the local network) of the computer hosting the website. This will then allow other computers on the local network to enter this host name to access the webiste.
If you had control of the local network's DNS server or control of the proxy (if they have a proxy), there would, of course, be other options.
Update:
Since you mentioned in your comment that you have control over the DNS server, here is how you could accomplish your goal via the DNS server. First, add a forward lookup zone for sample-app.com to the DNS server. Second, configure the default host for the zone to point to the computer serving up the website content. Now the client computers will resolve the local IP when the user enters sample-app.com into their web browsers. If you need to continue to have access to other hosts on sample-app.com, you might want to try asking about it on serverfault.