I'm working on a local Rails website, and I'd like to access to it from my visrtualbox machine running winXP
From my Ubuntu machine, I use my browser to open http://www.myapp.local:3000
How can I access it from Virtualbox?
Thanks a bunch!
On your xp machine, open up your hosts file at C:\Windows\System32\drivers\etc\hosts in a local text editor like notepad or whatever is on there.
Then add a line like this:
10.70.30.31 www.myapp.local
Where 10.70.30.31 is the IP address of your Ubuntu machine.
Save the hosts file. Then restart whatever browser you're using on the XP box. Make sure you close all of the browser windows you have open as well because your browser will cache your hosts file until you properly restart it.
Once you've opened a new browser window you should be able to access your rails site from the same address you use on your Ubuntu machine.
http://www.myapp.local:3000
Related
How can I open my local XAMPP site and iPad?
I tried to open it like this:
http://192.168.3.132
But it keeps loading so I guess it does not work.
The IP is correct, I got it using ipconfig (Windows).
I have installed WAMP version 2.5 on my windows 8.1 machine. When i browse to localhost in my browser, the WAMP server page is visible.
But when I browse to my localhost in my mobile connected to same AP, I get the message "403 Forbidden: You don't have permission to access / on this server".
Any suggestions?
WAMPServer is configured to be a single seat developer tool for the AMP stack on a windows system.
As such and for the security of the complete beginner, WAMPServers Apache is configured to only accept connections from the PC that is running the Apache service.
If you want to connect to Apache from an IP other than that of the PC running WAMPServer, like your phone or another PC on your local network, you have to tell Apache that is allowed.
The simple solution for this is to use the wampmanager menus system :-
wampmanager -> Put Online
This will change the httpd.conf file from
# onlineoffline tag - don't remove
Require local
To
# onlineoffline tag - don't remove
Require all granted
Thus allowing any ip address in the universe to connect to your Apache web server. If you are sure that there is no external access to your local network this is reasonable solution.
If however you think that now or at some future time your network may allow access over port 80 from an external source, I prefer to be a little more specific when I change this parameter. So if you prefer you can
Edit the httpd.conf file, use the wampmanager menus to do this
wampmanager -> Apache -> httpd.conf
Then change this
# onlineoffline tag - don't remove
Require local
To
# onlineoffline tag - don't remove
Require local
Require ip 192.168.1
assuming that your local subnet starts with those 3 quartiles and that your phone is connected to your router via WiFi.
If your phone is using your suppliers network i.e. not your WiFi this will not work and you will have to Port Forward your router, but thats another question.
I searched for solutions to resolve the error "Forbidden" with Wampserver 2.5 in Windows 8.1.
Here's what I found:
Locate the file: httpd.conf
In my case the file is in C:\wamp\bin\apache\apache2.4.9\conf
The look for the line <Directory "c:/wamp/www/">
And then look for the line Require local, next write the following:
Require all granted
Restart your wampserver and you can browse the localhost on every devices that stays connected in your local network.
If you try all the above cannot solve, then try this.
I have the same problem then I realize there is .htaccess file that blocks the directory listing. Try to remove or reconfigure the .htaccess file.
All the best.
I uninstalled and reinstalled the services, almost damage the wampserver.
I tried this, and the section "Fix 403 Forbidden error on other computer in local network" worked for me. It was simplier, becuase the issue was in the ‘httpd-vhosts.conf’ file.
https://www.digifloor.com/simple-steps-fix-403-forbidden-errors-wamp-server-28
I'm trying to debug my application but any URLs which contain localhost (I've tried IIS Express, Local IIS, a simple Node server, and a Python development server) are redirected to the IIS welcome screen.
Examples:
localhost:xxxx/MyController
localhost:xxxx/SomeFolder/SomeFile.html
localhost/MyApp/MyController
localhost/MyApp/SomeFolder/SomeFile.html
The URL changes from the full url to my external IP address (i.e., URL changes from localhost:xxxx/MyController to simply XX.XX.XX.XX)
I just tried launching with a brand new ASP.NET "Empty Web Site," just loading the index.html file, and same situation.
There are no entries in my hosts file and it appears that this is only happening in Chrome. Any ideas?
This works in php, so it may help you with ASP:
Run Notepad as administrator
Open C:\Windows\System32\drivers\etc\hosts file
add the following line to hosts file
127.0.0.1:123 yourserver.com
Save
Run command prompt using CMD in run or type it in start menu
Type this command and hit enter
ipconfig /flushdns
Close
go to yourserver.com
I hope this help you. Again, this works fine with PHP.
It sounds like your DNS is resolving the localhost hostname. If you're using your ISP's DNS, this may happen. You could change the DNS to Google's Public DNS. By pointing the DNS server to IP's 8.8.8.8 and 8.8.4.4. See the link for details on how to configure your computer.
I'm running a Windows 7 VirtualBox on my Ubuntu 13.10 machine where I have my rails app. I access my rails app through subdomains (i.e. subdomain1.lvh.me:3000) and I'm trying to access these same subdomains through my VB. I've read to change the host file but I haven't been able to make it work. Would I be using the Gateway IP or the IPv4 address?
The reason for me trying to accomplish this is to develop on my Ubuntu machine and test for IE issues on my VB without using paid third party websites to render my changes.
I think that if, for example, your ubuntu machine's ip address is 192.168.0.123, then it should suffice to have this line in your windows hosts file
192.168.0.123 subdomain1.lvh.me subdomain2.lvh.me subdomain3.lvh.me
Then on your windows vb you would access subdomain1.lvh.me:3000 like you say.
Have you done this? I don't know what you mean by " I've read to change the host file but I haven't been able to make it work. " What isn't working?
I want to view my project on an iPad over a local network. I have tried changing the IP address at the start from 127.0.0.01 to my IP address found using cmd and ipconfig but the files still won't load. Is this possible and how to please?
I believe that you need to run a server using a software like WAMP/MAMP/LAMP/XAMP or AMPPS. Then you may put your website in the "compiling" folder (usually it is something like htdocs or www). And finally you can use the http://localhost/ address.