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
Related
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
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 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.
I am having a problem with wamp server (again). First the icon would not turned green so I change the port to 8080 and now it turns green. However, when I visit localhost, I just get the message in the screenshot below.
Does anyone know what's going on here? Same when I try to go to PhpMyAdmin. I have version 2.1
try http://localhost:8080
(or http://127.0.0.1:8080 if there is a problem with the resolution of localhost)
you changed the port and I am not sure if you reflect this in your request.
Do you have Skype on in the background? If so turn it of restart your web server on port 80.
Edit: Like said in another response check for anything on port 80 and turn it off.
Check your system for any program that uses the port 80, and turn it off.
This will surely work:
Check in which Drive your Windows OS is installed. If it is E, F or other then C, then install wampp in that particular drive.
If Microsoft Visual C++ 2010 SP1 Redistributable Package is not intalled then install from : Download link
It should work.
I too faced the same issue during the installation.
This error is due to
1) if some other service is running on the same port
2) if some other application may block your application.
For checking
1.) Select the server icon. Select "www directory" and make sure it is pointing to where it should and that there are files there. --- It points to my Documents/wamp/www --- where there are an index and your test files.
2.) Select the server icon. Select Apache. Select service. Select "test port 80". See what port 80 is actually used by. --- I get "your port 80 is actually used by:......
Here you can find your port is used by which service.
If you have iis running remove that temporarily now by control panel-> uninstall program -. turn window feature on/off -> iis.
After this restart your system and run wampserver now. It will work Hope this may help
Check in your hosts file to see if there is a entry like this:
127.0.0.1 localhost
if there is a # before it like this
# 127.0.0.1 localhost
delete the hash as that is a comment
you will find your host file at:
C:\Windows\System32\drivers\etc
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.