configuration wampserver home router - wampserver

I can't access my wampserver from anther PC or cell phone.
I think the problem from my wireless router because I reset my router for default setting.
After resets I try to connect my wampserver but I found that I can't connect to the wampserver from others PC and cell phone.
How to configure wireless home router( my router is Dlink dsl) as localhost port?

This is probably nothing to do with your router.
WAMPServer comes configured as a single seat developer tool, and therefore the Apache config is setup to only accept connections from the PC running WAMPServer (Apache) to protect new users from external hacking attempts.
The Hammer to crack a Nut solution is this :
left click wampmanager -> Put Online
This amends the Apache config httpd.conf file to allow connections from any IP address in the universe.
The safer solution is to edit the httpd.conf file yourself and add the following line to allow access just from your internal network. When you are using your phone to connect to your server, it will have to be connected to your WIFI.
Edit htpd.conf using the wampmanager menus
left click wampmanager -> Apache -> httpd.conf
Find these lines in that file
# onlineoffline tag - don't remove
Require local
And add a line like this
# onlineoffline tag - don't remove
Require local
Require ip 192.168.1
Where 192.168.1 is the subnet your router uses.
Note the use of only 3 of the 4 quartiles, this says allow any device on that subnet access to Apache i.e. anything cabled to your router of anything connected to your routers wifi.
If you want to be even more specific you can mention specific ip addresses like this
# onlineoffline tag - don't remove
Require local
Require ip 192.168.1.20
Require ip 192.168.1.21
Require ip 192.168.1.22

Related

How do I change the IP address that Node-RED is hosted on?

I've been trying to configure Node-RED running locally at http://localhost:1880 to run on a static IP address that I would configured via my router's "DHCP Static IP Configuration" so that Node-RED could be accessible within the entire LAN.
How would I go about changing the IP address that Node-RED is hosted on, cause I haven't seemed to find any resources for it.
Would love to know the exact approach of running Node-RED on a LAN via a router; like should the static IP address be assigned to a particular device with a specific MAC address or can Node-RED reside on the router itself.
By default Node-RED binds to 0.0.0.0 which is the shortcut to say bind to all available interfaces (the log says to access via http://localhost:1880 because this will always be available). You should find that if you know the IP address of the machine running Node-RED and you enter http://ip-address:1880 from another machine on your LAN it should connect to the Node-RED editor.
You can change this bind address in the settings.js file (found in the userDir which is logged early on when Node-RED starts and is by default in ~/.node-red on a Linux/Unix machine). You can uncomment the uiHost line and change the IP address to what ever the static IP address of your host machine is. Under 99.9% of circumstances you should not do this and just leave it as the default 0.0.0.0
As for how you set your device that is hosting Node-RED to have a fixed IP address, that will be entirely dependent on the type of router you have, but usual approach would be to set the routers built in DHCP server to just asign a static IP address to that device as identified by it's MAC address. This means that you do not need to change anything on the device.
It is unlikely you will be able (or want) to to run Node-RED actually on your router, most home (or enterprise) routers are specialist devices and running a programming environment like Node-RED on them is really not a good idea from a security point of view unless you 110% know what you are doing.
Speaking of security, make sure you enable adminAuth in your settings.js before setting up any port forwarding on the router to expose Node-RED to the outside world. An unsecured Node-RED editor is likely to be quickly scanned by something like Shodan and promptly ushttps://nodered.org/docs/user-guide/runtime/securing-node-reded to host Crypto mining or much worse. Read the following carefully https://nodered.org/docs/user-guide/runtime/securing-node-red

Hosting own website on iis from home Win10 computer with domain mapping

I have a developed a web application based on asp.net mvc 4 framework and it works fine in visual studio. since we want to launch our website to public we bought a domain from the godaddy account. And in GoDaddy -> Domains -> Manage -> we mapped the domain name to public/external IP address e.g. 178.112.24.5 ( which is different from what i get in cmd-> ipcoonfig-> shows 192.168.0.2). I guess i should use the public ip addresss not the local ip address shown in the cmd -> ipconfig.
Now i created a web site under iis-> sites-> add new site -> mynewdomain -> with protocol as http, ipaddress as unassigned(default) , port as 80 and hostname as www.mynewdomain.com . But whenever i launch this site from iis, it routes to ISP router configuration login.html page(BTW i use Rogers Internet). So it also fails to launch from other network computers and chrome shows the error as ERR_CONNECTION_REFUSED.
I followed some posts on this site:
How to solve ERR_CONNECTION_REFUSED when trying to connect to localhost running IISExpress - Error 502 (Cannot debug from Visual Studio)?
https://serverfault.com/questions/54623/sites-in-iis-not-available-externally
I tried to fix this by defining firewall rule for port 80 (selected domain,private and public ) , dnsflush and some suggestions from the above two links. But it didn't fix the issue.
You want host your app yourself, ok.
So:
1. To access your host from other networks you've open ports (80 for http and ) in your firewall, sure your local IP address will 192.168.0.2 and you can access your app from LAN on it. But others must get your external IP.
2. Next moment is your domain resolver, you must setup your Name Servers for your host external IP address.
Now what can you do:
First of all use DMZ for testing, it will be open all connections to your machine, but after testing setup your firewall and open only nessessary ports.
And if your internet provider gives you your external IP + not blocking connections you can host your application.
Sure this way of host your web site is not recommended because:
A. Windows 10 Home is not server OS.
B. You need minimum 100 MB/s Speed.
C. Not secured to use home router as firewall.
Hope this will help you.

403 Forbidden - WAMP Server 2.5

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

WAMP Server Forbidden error

I have been running a website I have been developing on WAMPserver.
When ever I try to access it through my IPv4 address on the computer that it is running on and any other device on the network I ge a error 403 Forbidden You don't have permission to access / on this server.
Please help I kind of need it by a due date.
WAMPServer is designed as a development tool and not an environment for a LIVE site, so by default all the Apache security is based around allowing access from the PC running WAMPServer and nothing else.
If you want to open up your site to the world, you can use the menu item Put Online
left click wampmanager -> Put Online
If this does not work, usually becasue you have chnaged something in the httpd.conf file you can make the required changes manually.
Edit \wamp\bin\apache\apachex.y.z\conf\httpd.conf\httpd.conf
Find this section
# onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1 localhost ::1
And change it to
# onlineoffline tag - don't remove
Order Allow,Deny
Allow from all
If you are using Apache 2.4.x the syntax has chnaged and you shoudl change it to
# onlineoffline tag - don't remove
Require all granted
BE VERY CAREFULL not to change any other section to Allow from all or Require all granted as this can compromise you PC security very easily.

Remotely viewing web pages served by pow.cx

Using WEBrick you could navigate to an app you were serving from another device/virtual machine by navigating to your.ip.address.here:port
Is it possible to do something similar with pow.cx?
The latest version of Pow (0.4.0) now includes xip.io support. You can read about the release here.
Here's a quick explanation of how this helps Pow serve your Rails apps across your entire local network, from their post:
Say your development computer’s LAN IP address is 10.0.0.1. With the
new version of Pow, you can now access your app at
http://myapp.10.0.0.1.xip.io/. And xip.io supports wildcard DNS, so
any and all subdomains of 10.0.0.1.xip.io resolve too.
Here's a description of xip.io, from their site:
xip.io runs a custom DNS server on the public Internet. When your
computer looks up a xip.io domain, the xip.io DNS server extracts the
IP address from the domain and sends it back in the response.
There are basically two options:
Don't use pow: run your applications on localhost as usual and access them as usual
Edit the hosts file (or local DNS) to point your server machine ip
Example accessing from a virtual windows machine:
Suppose you are running two rails applications in pow: store.dev and auth.dev, and you want to access them from a windows xp virtual machine to test them with IE, you only need to edit your hosts file to add the lines:
C:\WINDOWS\system32\drivers\etc\hosts
# Allow to access applications in pow.
# The ip address points to the host machine localhost, that usually is the default gateway
10.0.2.2 store.dev
10.0.2.2 auth.dev
And then open the IE browser to access your applications in http://store.dev and http://auth.dev respectivelly.
Specifically, no, because Pow uses the Host header of the request to determine which app you need to access. To get that working remotely, you would have to have the remote machine map the required domain name to your IP address - either with a local DNS server or by editing the HOSTS file. Both of which are possible but annoying.
The simplest thing to do in that case is to start up a standalone Rails server as you mentioned (using ./script/server or rails s depending on the version), and then you can address http://[ip address]:3000 as before.
In other words, Pow works because it intercepts your local domain resolution, something that isn't affected by (or available to) remote machines.

Resources