MAMP- Use local IP instead of 'localhost' in address? - drupal

Is it possible to get MAMP to show my local IP address in the url instead of the text 'localhost'?
The reason I want this is im using the Drupal CMS which caches some absolute links to images. Im on mac so I need to test my site with a PC so I can use IE. If I type in my mac's local IP address I can access the site over my network.
However, the absolute links which use 'localhost' not the IP don't display.
Thanks

I'm about 99% sure that if you set up MAMP to work on port 80 you'll get your local drupal site from a remote machine on the same network (if you don't set it up on port 80 you'll just need to append the port number to the request ie: h ttp://1.0.0.0.1:8080/)

Ive found a solution. If I access the site on my local computer and type in my local IP, and then refresh the cache then the absolute links are created with the local IP. This makes them work on both my main computer and networked ones aswell.

Related

Block access to website from router(using its IP adress)

I'm trying to block access to a website (e.g site.com), to do so I used dig site.com to get the site's IP adress (I'm on Ubuntu). The result will be something like this:
site.com. 10000 IN A 101.53.182.181`
Then mapped new IP ( localhost ) to the domain name 'site.com' on /etc/hosts, as the following:
127.0.0.1 site.com
That will do the thing for my local machine, but not for the whole network's devices.
Also tried to configure from the router using telnet 192.168.1.1 but I lost it, I don't know how to do it.
How can I manage to block traffic from that particular site? Is there anyway to block access to websites using their IP address?
PS: I tried the classic way to block the site using its domain name (e.g site.com), but it doesn't really 'block the site', I can still access it by searching the website on Google.
You can try accessing your router's web interface. Make sure to set your computer's (laptop's) IP address manually to 192.168.1.2, subnet mask to 255.255.255.0 and then gateway to 192.168.1.1 for the computer's Eth0 interface. I suggest to use the wired interface instead of WLAN or WiFi. Then, access the router on a web browser using 192.168.1.1.
In your router's settings page, look for the following:
Block Sites
Access Restrictions
Security
Advanced
or something similar to the mentioned categories above. This may depend on the settings, so I advise to refer to your router's manual. Once you find the setting, indicate the domain/s or IP address (via dig) that you want to block, then apply the settings or changes that you have made.

XAMPP/Wordpress is using a different IP address after new modem

So my ip address has changed so I can no longer access my WP Admin from my pc. It's redirecting to a different device/ip on my wifi so, therefore, cannot access it on my PC anymore. Can I edit/reset the Wordpress settings from ftp or PHPMyAdmin? So it points to localhost instead of a different device ip?
I also had a problem with my windows ten (my other Samsung Computer)
So I searched this up.
https://kinsta.com/knowledgebase/xampp-not-working/
This actually contains 3 common solutions to the problems that we both have had and are having.
Resolve Apache Port Conflicts (This actually fixed my problem)
Include the Listening Port in the Address When Accessing Localhost
Change Your MySQL Port (Although I think this is the least helpful one)
For more explanation, click on the link above.

how do i make my website accessible from the internet without a static ip and from a virtual machine?

I have windows 8 host and i have installed ubuntu 14.10 server as a virtual machine in vmware. i have installed LAMP server and i am trying to host a website from it. i have created a virtual host. my website is accessible in the host machine when i go to the address 192.168.0.106.
my router info:
LAN
IP Address :192.168.0.1
INTERNET
IP Address :10.30.XXX.XXX
"what is my ip" in google: 113.XXX.XXX.XXX
how do i make my website accessible from the internet ? I know it is a dumb question, but i tried searching everywhere and could not get the solution.
Since you say that you can connect to the site from the host machine, it does not matter that it is in a VM.
You say that you can connect to your site via: 192.168.0.106 on the LAN. You need to forward connections to your WAN address (113.193.56.198) to your LAN address (192.168.0.106). You can do this in most router settings in a section called Port forwarding. Use port 80 if you're hitting the LAN IP from a browser and you don't have to add a port after the address like http:\\192.168.0.106:1234. Otherwise, use whatever port you like.
Once you get that working, it is a good idea to use a dynamic DNS service, which will connect your IP to a domain name and update the connection whenever your WAN IP changes. This way, instead of using the WAN IP in a browser, you can use your domain name and it should always work. But that's not your first problem. First get it working with the WAN IP by itself. Once you've got that working, get some DynDNS.
EDIT
If you think it should be working but can't figure out why it isn't, use a tool like nmap/zenmap to scan your WAN and LAN IPs. That will help you diagnose the problem.
A DynDNS should do the job!
It will automatically renew your dynamic ip address. All you need is; a tool that runs on your server with website.
Search for it on google, and you'll find a solution. Btw: there are, Free and paid solutions.
EDIT: by the way, your router requires additionally some port forwarding to make your website accessible from outside. Even with the DynDNS stuff installed.
Just to give you some indications.

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 :)

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

Resources