Macbook how to access localhost - macos

I am trying to set up my working environment at home. I am using a macbook, I did all the set up just like the PC in my office. I am be able to build the projects, start tomcat with no error. But I don't know how to access the running application. I am using VPN to connect the tomcat database in my office, everything looks fine. The problem is, on the PC in my office, I set the 127.0.0.1 point to localhost in the system host file, then I can use localhost/admin to access the application after I started tomcat. I did the same on my mac, and it is not working. Then I found the local ip address should not be the 127.0.0.1 for mac, I searched on the internet to see how to find the ip address, I found my ip address is 192.168.1.191. I use 192.168.1.191/admin, I still didn't see my application. Can someone please help me to fix this?

Related

VirtualBox redirects to localhost when loading JetBrains Upsource

I've hit a brick wall and can't get past it as there isn't too much information out there on this problem. I have a VirtualBox on my Windows machine running Ubuntu with JetBrains Hub and Upsource installed on it. For making it public I am using apache2. I am able to run 'upsource.sh start' and start upsource ok, however when I try to access the website from an external network, the page gets stuck at 'Loading...' and then fails with '[name of my virtual box] server DNS address could not be found.'.
I am able to access the site from the internal network and everything works fine. I am forwarding a port from my public IP to the virtualbox port that is listening for JetBrains Upsource.
My hint is that the virtualbox is redirecting to itself and the client on the external network cannot reach that address. I am unfamiliar with apache so I'm not sure that it's configuration is setup properly. If anyone has run into this problem and fixed it or if anyone knows how to begin to debug/fix this... I'm all ears.
Thank you guys.
EDIT: The server seems to be hanging when the request for OAuth2 is made. Its making request to the virtualbox's local address rather than the public ip.
To anyone who runs into the problem in the future, I had to reinstall and put in the correct base-url. I'm guessing I was missing some properties that I needed to re configure and I could not find anywhere what all properties that I could configure.

how to Accessing localhost (xampp) from another computer over LAN network?

I have a WI-FI & LAN network at office. I have all my files on my desktop computer (192.168.1.2) and want to access local host over there from another computer (192.168.1.8).
My xampp version is v3.2.2 and windows 7 64 bit.
On my desktop I can access localhost through the normal http://localhost. Apache is running on port 80 as usual.
Exactly what do I have to do to achieve this? There is documentation on the net but they either don't work me or are too old and confusing to understand.
Any ideas as to what changes to make it possible? Please give me step by step instructions.
User should have access of your localhost, you can check this by sharing the folder and check on other machine that folder is accessible or not, If it is accessible then that user easily can access your local host by using the http:/IPAddress, If not contact to IT department they will help to achieve this by removing some restriction on network.

How can I access a webpage located inside a VM from the host machine's browser?

I am able to access the link http://localhost/men/tops-men/jackets-men.html successfully from my VM (configured using X2Go client).
IP Address of the VM: 10.146.106.204
I am also able to ping the VM successfully from my host machine (Windows).
The page that I am trying to access is a php page deployed on Apache Web Server.
However I am not able to do so from my Windows host machine.
I tried http://10.146.106.204/men/tops-men/jackets-men.html from my Windows machine but it did not work.
Do I have to configure something on my host machine or on my VM ?
Not sure what I am missing.
On VM check you can view http://10.146.106.204/men/tops-men/jackets-men.html
If not you need to configure the web server to listen on that IP (if you're running IIS this is under "bindings" in the right-hand side panel of IIS Manager).
On Host open a cmd window and check you can ping 10.146.106.204
If not check your firewall settings on the VM.
If neither of these 2 things help then you need to add more information about your setup to the question. Those are 2 very simple things you can do to diagnose 2 basic problems you might be having.
I was finally able to solve the problem based on this SO link: Unable to access magento site from anywhere but localhost
Updated the DB table core_config_data and updated the data by replacing http://localhost with http://ip-of-vm and then restarted the apache web server.

Cannot access WCF Service running inside Parallels from outside

I have a WCF service which is working perfect inside of my Parallels Bootcamp VM
However, I cannot get this working from outside, i.e. the MAC that parallels is running on
The IP address is shown as 10.211.55.3 using IP Config
The service is running via port 17377 so I am trying to use the URL 'http :// 10.211.55.3: 17377/CalculatorService.svc'
It appears as though this is normally caused by firewall issues
However, the firewall is off on both the windows VM and my MAC
Has anyone got any other ideas about what the problem could be?
I have tried this with another WCF service and still have the same problem, the 10.... IP address errors with invalid hostname
Paul
This has now been fixed thanks
If anyone else ever gets a similar issue to this the easiest thing is to change the parallels network to host only although this does disconnect the internet
I had to do that as well as modifyibg the host file on both the vm and mac to link the machines IP address to an specific host I gave it

Stored Endpoint IP Address after Network Configure Changes in RMI

I've got a RMI server running on a mac. Once I changed the server IP and restart the Application and clients, then clients keep connect to the old ip address with right bind and lookup address. I really have no idea what went wrong because the program is working on another linux server just with different port.
What the remote object clients got is Proxy[MinervaInterface,RemoteObjectInvocationHandler[UnicastRef [liveRef: [endpoint:[192.168.0.104:51815](remote),objID:[40d99efb:140ba232cec:-7fff, 6333954213550330995]]]]]
which 192.168.0.104 is the old IP and it should be 10.0.1.104
I've check the host file and my code, there is no anything like 192.168.0.*
Please help, Thank you.
UPDATE
I have confirmed this is a server registry problem. But I have already restarted the server. I did't remember what else did I do to the registry. Is there any way to set it manually?
UPDATE
I rune this code on that server InetAddress.getLocalHost().getHostAddress(), it returned 192.168.0.104, that can explain where this address came from. But there is no such address on the server now
SOLVED
I found java use a hostname to lookup localhost address, that hostname is not localhost and have not been updated by OS X Server for some reason. I updated the record from OS X Server console and solved this annoying problem.
NEVER THOUGHT ABOUT THAT

Resources