Localhost on Windows 7 - windows

I want to enable a localhost on Windows 7 to be able to build websites with Chrome without a distant server. I would like to not install anything, and be able to, for example, navigate to http://localhost/something/somethingElse/index.html.
Anyone knows how?

In order to activate localhost server on Windows 7 navigate to:
-> Control Panel -> Programs and Features -> Turn Windows features on or off
Then search for Internet Information Services and check its checkbox.
Wait for Windows to make the changes, no need for immediate restart, the server will be enabled.
You can now navigate to
127.0.0.1
or
http://localhost

There is a simple chrome extension "200 OK". Which runs a web server on localhost.
Custom port settings
Choose your project folder and start the server

Related

localhost web server on win10 with no admin

so, I want to create a web server and store it into my computer (it's a win10 btw) and i am not the admin.
and when I search localhost it shows an image that if I click it will send me to the IIS site.
pls help me.
Disable it IIS :)
there is no reason to install it or have it installed if you dont use it
Hit the Windows-key type: "Add or Remove Programs". If you get the new Settings app of win10
You have look to right top corner
from there click Add/Remove Windows Components.
Select the Internet Information Services (IIS) uncheck box, click Next, then click Finish.
than try to host your server again

Scripting Website Interaction With Firefox

I would like to script Firefox to do the following:
Open my website in multiple tabs
Perform some action on the loaded site (e.g. click on a button)
Preferably running some script (e.g. Python) and somehow connect to my local Firefox and send some commands over.
I know that I can do (2) on the web console with, e.g. $x('/xpath/to/my/button')[0].click(), so I thought of using Firefox's remote debugging mechanism, but
I'm not sure how to "talk" to Firefox using a script through the debugging port (i.e. what syntax)
Somehow I can't even get the remote debugging port to open.
I've tried the following solutions:
Start Firefox with firefox --start-debugger-server 9000
Enter listen 9000 on the web console
Enable Enable browser chrome and add-on debugging toolboxes and Enable remote debugging
All of the above at the same time
But still couldn't get remote debugging to work (didn't open the expected listening port).
Any idea how I could do the above (with remote debugging or something else)?

Running visual studio solution on local host Google Chrome

When trying to run a visual studio application on localhost using Google Chrome, I always get this screen:
http://imgur.com/iFCj0iQ
It seems to be automatically redirecting to the default page of IIS.
When running on Internet explorer it runs ok. Any help?
Hey wait a moment are you looking for localhost or not? I mean, are you accessing from the same computer or not?
TO ACCESS FURTHER INFO
to discover which process is using the defaul port for http 80 run nestat -ano and look for pid that has port 80 in his local address and the kill it with taskkill
TO DISABLE IIS
To disable IIS you have to go in settings -> "turn windows features on or off" and deselect "Internet information service"
for more info: http://windows.microsoft.com/en-us/windows/turn-windows-features-on-off#1TC=windows-7

Unable to access localhost from x-ms-webview

I have this code in my WinJS default.html:
<x-ms-webview src="http://localhost/"></x-ms-webview>
<x-ms-webview src="http://display/"></x-ms-webview>
<x-ms-webview src="http://192.168.1.2/"></x-ms-webview>
display is defined in the hosts file:
127.0.0.1 display
and 192.168.1.2 -- the one that is successful -- is another computer on the network.
This is in my appx.manifest:
display and localhost successfully load in IE on the desktop and metro.
My OS is Windows 8.1 Enterprise. I have also completely disabled the Windows Firewall and this has had no effect.
What else can I do?
Microsoft blocks connections to the local machine except while running from the Visual Studio debugger.[1]
There is, however, a workaround tool. Quoting from this post on an MSDN blog:
Immersive applications (and IE11 on the Desktop) run inside isolated processes known as “AppContainers.” By default, AppContainers are forbidden from sending network traffic to the local computer (loopback).
[...]
I have built a GUI tool that allows you to very easily reconfigure an AppContainer to enable loopback traffic. This tool requires Windows 8 and runs on the .NET Framework v4. When launched, the utility scans your computer’s AppContainers and displays them in a list view. Each entry has a checkbox to the left of it, indicating whether the AppContainer may send loopback traffic. You can toggle these checkboxes individually, or use the buttons at the top to set all of the checkboxes at once. Click Save Changes to commit the configuration changes you’ve made, or click Refresh to reload the current configuration settings.
The aforementioned standalone tool is available from here.

Using Chromium Remote Debugging from External Device

Chrome can be run to support remote debugging by starting it via the command line with a prompt such as chrome.exe --remote-debugging-port=9222 --user-data-dir=C:/foo. This is often used to debug on android or iOs using a Browser on a Desktop Device but I would like to debug chrome running on a desktop PC. from a "client browser" on the same machine one can call localhost:9222 and see the server browser, calling localhost:9222/json will result in a json representation of the tabs open in the "server browser". This works just fine.
However, when I try to use another device in the same (wifi) network by calling [local IP]:9222 or [local IP]:9222/json (local IP is the IP of the server browser) I get a connection timeout. Is it possible to use remote debugging in such way? Are any other switches needed when starting the browser?
Edit I have found some use of forward tcp for the debugging of mobile devices, but there does not seem to be such a switch for chrome.
Edit 2 This seems to be a bit of a duplicate of the questions here and here however, as of yet I have not gotten the solutions presented there to work.
So, apparently this comes down to forwarding a port to localhost:9222. However, at least on windows machines I have no luck with SSH tunnels. Are there any other ways to forward on the machine?
As you've mentioned it, the solution is to forward the port 9222. Below you find approaches for Linux and Windows.
Linux
After having started chrome with
chrome --remote-debugging-port=9222
Forward the port
ssh -L 0.0.0.0:9223:localhost:9222 localhost -N
This way you can access the debuggin interface from an external device on port 9223 using a Chrome browser.
Windows
As seen in this answer, on windows (tested on 7,8) the easiest way to do portforwarding without 3rd party apps is via netsh
I've created a batch file with the following content. It has to be ran as administrator, and with no previous chrome windows open:
netsh interface portproxy delete v4tov4 listenport=9222 listenaddress=0.0.0.0
start /b cmd /c call "\program files\google\chrome\application\chrome.exe" -remote-debugging-port=9222
timeout 5
netsh interface portproxy add v4tov4 listenport=9222 connectaddress=127.0.0.1 connectport=9222 listenaddress=0.0.0.0
This way you can access the debuggin interface from an external device on port 9222.
Make also sure that no firewall is blocking the corresponding port.
You can achieve the same behaviour by adding the argument
--remote-debugging-address=[YOUR_EXTERNAL_IP_ADDRESS] as reported here, without any additional software other than Chrome itself.
I've successfully used RInetD for easy port-forwarding in Windows 7, tried this and it worked like a charm, externally debugging a Chrome browser in Windows from a Chrome in Mac/Ubuntu.
You can download rinetd from:
http://www.boutell.com/rinetd/
Unzip the file, create an empty file with any name (I used rinetd.conf), with this content:
0.0.0.0 9223 127.0.0.1 9222
The in Windows console run it with:
rinetd.exe -c rinetd.conf
And voila!

Resources