Wamp Error-You don't have permission to access / on this server.Access through IP - wamp

I want to access my website through IP
I am getting this error-
" Forbidden You don't have permission to access / on this server.
Apache/2.4.35 (Win64) PHP/7.2.10 Server "
Eg. My IP: xxxx.xxx.xxx.xxx when i put this ip in browser URL bar some website's index page should open kept in www folder. Thanks in advance.

I met the same problem and I solved it.
change 'Require local' to 'Require all granted' in apache2.4.35 httpd.conf and httpd-vhosts.conf files.
restart wampsever.
it works,the point is 'local' means JUST local so You don't have permission to access through IP

Related

Django nginx Refused to display in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'

I have deployed a django web application on a server with nginx and uwsgi. I can access the site perfectly using the ip address.
I purchased a domain name say abc.example.com and pointed it to my ip address. Now when i go the domain name it loads a blank page and throws an error in browser console:
In Chrome:
Refused to display 'ip address' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.
In Mozilla:
Load denied by X-Frame-Options: 'ip address' does not permit cross-origin framing.
The point is I dont have any iframe in my whole Application.
What is this error and how can i solve it?
When i go to application using ip address it works perfectly as it is supposed to be. Then what is the problem with domain? I double checked the settings in dns zone on godaddy but couldn't figure out anything.
In 'settings.py' file, add these two lines. It may help you.
X_FRAME_OPTIONS = 'ALLOWALL'
XS_SHARING_ALLOWED_METHODS = ['POST','GET','OPTIONS', 'PUT', 'DELETE']

Google: Permission denied to generate login hint for target domain NOT on localhost

I am trying to create a Google sign-in and getting the error:
Permission denied to generate login hint for target domain
Before you mark this a duplicate, this is not the same as the question asked at Google sign in website Error : Permission denied to generate login hint for target domain because in that case the questioner was on localhost, whereas I am getting this error on the server.
Specifically, I have included the url of the server in the Authorized Javascript Origins, as in the following image:
and when I get the error, the request shows that the same url was sent, as in the following image:
Is there something else I should be putting in my Restrictions page? Is there any way to figure out what is going on here? Is there a log at the developer console that can tell me what is happening?
Okay, I figured this out. I was using an IP address (as in "http://175.132.64.120") for the redirect uri, as this was a test site on the live server, and Google only accepts actual urls (as in "http://mycompany.com" or "http://localhost") as redirect uris.
Which, you know, THEY COULD HAVE SAID SOMEWHERE IN THE DOCUMENTATION, but whatever.
I know this is an old question, but it's the first result when you look for the problem via Google, so I'll share my solution with you guys.
When deploying Google OAuth service in a private network, namely some IP that can't be accessed via the Internet, you should use a magic DNS service, like xip.io that will give you an URL that your browser will resolve to your internal IP. You see, Google needs to be able to reach your authorized origin via your browser, that's why setting localhost works if you're serving it on your computer, but it won't work when you're deploying outside the Internet, as in a VPN, intranet, or with a tunnel.
So, the steps:
get your IP address, the one you're deploying at and it's not a public domain, let's say it's 10.0.0.1 as an example.
add http://10.0.0.1.xip.io to your Authorized Javascript Origins on the Google Developer Console.
open your site by visiting http://10.0.0.1.xip.io
clear your cache for the site, if necessary.
Log in with Google, and voilĂ .
I got to this solution using this answer in another question.
If you are using http://127.0.0.1/projects/testplateform, change it into http://localhost/projects/testplateform, it will work just fine.
If you testing in your machine (locally). then dont use the IP address (i.e. http://127.0.0.1:8888) in the Client ID configuration , but use the local host instead and it should work
Example: http://localhost:8888
To allow ip address to be used as valid javascript origin, first add an entry in your /etc/hosts file
10.0.0.1 mydevserver.com
and then add this domain mydeveserver.com in Authorized Javascript Origins. If you are using some nonstandard port, then specify it with your domain in Authorized Javascript Origins.
Note: Remove your cache and it will work.
Just ran across this same issue on an external test server, without a DNS entry yet. If you have permission on your local machine just edit your /etc/hosts file:
175.132.64.120 www.jimboweb.com
And use use http://www.jimboweb.com as an authorized domain.
I have a server in private net, ip 172.16.X.X
The problem was solved with app port ssh-forwarding to my localhost port.
Now I am able to use deployed app with google oauth browsing to localhost.
ssh -N -L8081:localhost:8080 ${user}#${host}
I also add localhost:8081 to "Authorized URI redirect" and "Authorized JavaScript sources" in console.developers.google.com:
google developers console
After battling with it for a few hours, I found out that my config in the Google Cloud console was all correct and similar to the answers provided. Due to caching issues or something, I had to recreate a OAuth Client ID and then it suddenly started working.
Its a pretty old issue, but I encountered it and there wasn't any helpful resource, as such I am posting my solution.
For me the issue was when I hosted my web-app locally, a using google-auth for logging in.
The URL I was trying to hit was :- http://127.0.0.1:8000/master
I just changed from IP to http://localhost:8000/master/
And it worked. I was able to log in to the website using Google Auth.
Hope this helps someone someday.
install xampp and run apache server,
put your files (index and co) in a folder in the xampp dir (c:\xampp\htdocs\yourfolder).
Type this in your browser url - http://localhost/yourfolder/index.html

Windows wamp phpmyadmin gets redirected

The wamp phpmyadmin on my localhost keeps getting redirected to the phpmyadmin of the live site instead. I can can access my localhost though. Only the phpmyadmin is wrong
I have no idea how to fix this. Anyone can help?
Take a look at the Apache configuration posted here
If you tampered (changed) the hosts file you need to remove any of your own edits related to localhost, other than the defaults. If you don't know what that is or you did not change anything there, than it is not a hosts file issue and it is most probably the Apache configuration
phpmyadmin is configured to be accessible only from http:// localhost

Oscommerce store access from other machines using ip address

i created ecommerce store using oscommerce and hosted in local host on IIS. anyone can access this site http://27.7.136.234/oscommerce/ but once they click on any link in the site, url changes to http://localhost/oscommerce/product_info.php?products_id=28. i.e. local host is replacing ip address so others cant access my store. what can i do to solve this
you should change the URL in your config file. It should be located in the includes folder if I remember correctly.

How to access parts of localhost with device

I've pulled the latest stable MOODLE_21_STABLE branch to my WAMP server localhost location, all installed and configured successfully, works in browsers as per usual. I'm poking around theming now, and would like to test out device-specific themes.
SO questions helped me successfully connect to my localhost via iPhone Safari and Android Chrome, I can navigate the various projects and tools I have on localhost - all of that works wonderfully (successful URL eg: http://192.168.123.135/ - this is the root WAMP page).
Next, I tried to access my Moodle install via Safari (URL for reference: http://192.168.123.135/moodle/moodle2/htdocs/), but Safari prompts an error:
"Cannot Open Page. Safari cannot open the page because it could not connect to the server."
The page beneath the prompt reads:
"Incorrect access detected, this server may be accessed only through 'http://localhost/moodle/moodle212/htdocs' address, sorry. Please notify server administrator."
Two things to note:
Safari re-writes the IP address portion of the URL to 'localhost' for the failed Moodle URLs I've been trying to enter, when it prompts the error. My own project URLs keep their IP portion.
The above 'suggested' address in the page error also delivers the same error message again.
I feel like I'm inches away from awesomeness here, does anyone have any advice/ideas as to how I can access my Moodle install on a WAMP localhost (or similar), when browsing via device?
Is there some server setting I need to dis/enable?
Is this likely to be a Moodle specific issue, or is there something about accessing server locations in this way that is troublesome/not possible?
Make sure that both $CFG->wwwroot and the IP address of the Apache vhost in the WAMP configuration files are set to 192.168.123.135. Also possibly the hostname too. It sounds like you have a config issue with internal and external DNS names not resolving in quite the same way. Apache is probably the culprit.
Are you referring to desktop Safari installed on the same machine as WAMP?