how to access website hosted on Xampp server through my ip address instead of local host - networking

I've installed xxamp. what i am looking for is i want to access xamp/htdocs/index.php through my IP address not from local host. can any One tell me step by step procedure ? thank you ?

Assuming that xxamp uses Apache (since I've only used wamp) there is configuration file that you can modify: httpd.conf
There should be a line that says "ServerName local host" add a '#' sign in front of it start a new line and type "ServerName (your IP address)" without the quotes and without the parathensis and insert your IP address. I THINK you have to put :80 at the end of your IP.
I did this with wamp, and accessed my files through my tablet and other devices with a router.

Related

how to call a website from cmd using a non registered domain name?

Usually When you ping a website (e.g Google.com) it replies with a specific IP
My question is: Is there anyway where you can call a website and replies with an IP you have set manually like 1.2.3.4
meaning if I ping google.com from my pc it will reply with 1.2.3.4
You can do this by adding the domain and IP to your host file. What OS are you running?
On Windows Server 2012 you will find the host file on %systemroot%\system32\drivers\etc
Add your domain and IP like this
64.49.219.194 www.domain.com
Try ping again.

How to mask my local ip with an user friendly name?

I am developing a web application, I've made the project in my localhost, but the net users need to access to my project and I dont want to give them a non-friendly ip address, so I wanna user acces with a name for example
http://myproject/
If this is on a local network you can edit the hosts file on your computer to "mask" the ip on the network. Of course you'll have to change the project to use the network ip instead of localhost.
go to MyComputer>Drive C>Windows>System32>Drivers>etc>
Open hosts file
After opening the “hosts” file that will look as below. Here you can add your favourite domain name with the same IP address as I have added the ebaytemplate.com with the IP of 127.0.0.1.
now run you localhost and in browser type ebaytemplate.com you localhost will run :)

Accessing local IP address via a hostname

How can I access a local network IP address (e.g. 192.168.1.91) via a hostname from another machine in the same network (e.g. localhost)?
The reason I want to do this is because my local server running my development application can be accessed from other machines via the IP, however the web app is Dependant on the host name remaining consistent.
You can see where the problem arises when the server is told to fetch images and scripts that rely on the host being localhost and not 192.168.1.91.
I'd suggest that you use localhost only to refer the loopback address (127.0.0.1).
In your case best option would be to register the server in DNS (e.g. test-server.example.com).
If you don't have access to DNS you should be able to use hosts files instead. Just add the following line to your hosts file on all computers that need to access the server:
192.168.1.91 test-server.example.com
hosts file can be found in /etc/hosts in Linux and in %WINDIR%\system32\drivers\etc\hosts in Windows.

How to view a web page served from one computer from another computer

I am running a website from IIS on one computer and I want to view the web page on another computer. the only way I can do this is by using the ipaddress of the computer with IIS on it but would rather have a url. How can I generate a url or use a domain name from dynamicdns.com. I signed up for an account on that website but dont know how to use it. I dont know how to configure it.
If the computers are in the same LAN you can substitute the computer's name for the IP. If you want the website to be visible outside the LAN, and accessible according to your dynamicdns.com name, you'll probably have to set up port forwarding on your router so that requests for port 80 are sent to the IP address of your IIS server.
edit your hosts file under Windows/system32/drivers/etc
add the ip and any hostname you want to use, e.g.
74.125.19.103 my.hostname.com

Is there a way to replace 127.0.0.1 on my local machine for test purposes?

I know it may sound stupid but anyway. Maybe there is a trick?
I just want that the local web server receives requests from my local machine but somehow sees a different IP address? Even one single that is different from the infamous 127.0.0.1 would of a great assistance.
Are there any options available?
Try 127.0.0.2 or 127.0.0.3 ... or ...
Seriously, try it!
Depending on your operating system, localhost might be reachable via the entire 127.0.0.0/8 network, so even 127.42.37.254 would reach localhost (it does on my Ubuntu machine).
Or put an entry in your HOSTS file for anything you want, pointing to localhost.
Are you accessing the local web server via 127.0.0.1? If so, what if you use your machine's actual IP address? The request will still end up at your local web server, but maybe it will see that as the sender instead of 127.0.0.1.
You could use your public IP address.
You can always configure webserver to listen on your network ip address and then use that ip.
On the other hand if you are looking to get requests from multiple domains like a.localhost, b.localhost, and c.localhost try editing your hosts file to redirect domains to 127.0.0.1

Resources