http-status-code-403

file_get_contents won't return the source code

人走茶凉 提交于 2019-12-13 02:07:08
问题 When I execute this code: var_dump(file_get_contents('http://www.zahnarzt-gisler.ch')); I get this error: Warning: file_get_contents(http://www.zahnarzt-gisler.ch): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in /home/httpd/vhosts/your-click.ch/httpdocs/wp-content/themes/your-click/ajax-request.php on line 146 bool(false) I don't know why it is returning false, since when I change the url, e.g. http://www.google.com or any other url, it will work and returns the source

403 error on localhost with zend framework 2

我的未来我决定 提交于 2019-12-13 01:32:41
问题 Ok, so I've been getting the 403 error when trying to load this up - I installed Zend 2 even via youtube guidance of someone fortunate that it's works for out of the box. I followed this advice, but that didn't work because LoadModule rewrite_module modules/mod_rewrite.so wasn't commented out of my httpd.conf file. I tried this, but adding Options +Indexes +FollowSymLinks +ExecCGI to my vhosts.conf file didn't help. I tried removing the .htaccess file altogether. I tried commenting out the

http://nominatim.openstreetmap.org api giving httpcode 403

懵懂的女人 提交于 2019-12-13 00:04:25
问题 api call to http://nominatim.openstreetmap.org/search?format=json started giving httpcode 403. We are using this api since last 2 years and never faced such issue. Suddenly today it started giving this error. Any kind of help is appreciated! 回答1: Added HTTP Referrer and it worked! As per their usage policy , valid HTTP Referrer is required. However not sure about how it used to work earlier. 来源: https://stackoverflow.com/questions/48700300/http-nominatim-openstreetmap-org-api-giving-httpcode

Django - permission denied

时光总嘲笑我的痴心妄想 提交于 2019-12-12 19:14:37
问题 I'm trying to setup Django (Django 1.9.6) on Apache (Apache 2.4.10) in my vps (ubuntu server 15.04). I followed this guide: HERE Unfortunately when I try to visit my website, the server return this error (403 Forbidden):` [authz_core:error] AH01630: client denied by server configuration: /home/user/proj/proj/wsgi.py I searched everywhere for a solution but everything I tried didn't work. this is my /etc/apache2/sites-available/000-default.conf file: Alias /static /home/user/proj/Gestione

lighttpd PHP Error: 403 - Forbidden

ⅰ亾dé卋堺 提交于 2019-12-12 16:12:20
问题 I have been trying to configure a web server using lighttpd on Windows. After installing PHP, everytime I try to access a PHP file from the directory 'htdocs,' I get the error: '403 - Forbidden.' I have followed this tutorial to setup lighttpd: http://joshdick.net/writing/lighttpd. I have searched Google, but haven't found any good documentation on this problem. FYI: I'm pretty new to this. I have the content of my 'lighttpd-inc.conf' file here. Any help would be greatly appreciated. Thanks!

commons io 403 for URL but httpclient is ok

被刻印的时光 ゝ 提交于 2019-12-12 12:11:53
问题 commons io code : String resultURL = String.format(GOOGLE_RECOGNIZER_URL, URLEncoder.encode("hello", "UTF-8"), "en-US"); URI uri = new URI(resultURL); byte[] resultIO = IOUtils.toByteArray(uri); I got this exception: Exception in thread "main" java.io.IOException: Server returned HTTP response code: 403 for URL: http://translate.google.cn/translate_tts?ie=UTF-8&q=hello&tl=en-US&total=1&idx=0&textlen=3 at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1436)

JSoup error 403 when trying to read the contents of a directory on my website

天大地大妈咪最大 提交于 2019-12-12 09:27:36
问题 Exception in thread "main" org.jsoup.HttpStatusException: HTTP error fetching URL. Status=403, URL=(site) at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:449) at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:465) at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:424) at org.jsoup.helper.HttpConnection.execute(HttpConnection.java:178) at org.jsoup.helper.HttpConnection.get(HttpConnection.java:167) at plan.URLReader.main

Cloudfront signed cookies issue, getting 403

帅比萌擦擦* 提交于 2019-12-12 04:54:31
问题 We have used CloudFront to store image URLs and using signed cookies to provide access only through our application. Without signed cookies we are able to access contents but after enabling signed cookies we are getting HTTP 403. Below is configuration/cookies we are sending: Cookies going with the request: CloudFront-Expires: 1522454400 CloudFront-Key-Pair-Id: xyz... CloudFront-Policy: abcde... CloudFront-Signature: abce... Here is our CloudFront policy: { "Statement": [ { "Resource":"https:

I get a 403 error when inserting an image tag into my website

ε祈祈猫儿з 提交于 2019-12-12 03:44:41
问题 I'm dynamically inserting the following tag into my webpage: <img src="http://ia.media-imdb.com/images/M/MV5BMTgxMDczMTA5N15BMl5BanBnXkFtZTcwMzk1MzMzMw@@._V1_SX300.jpg"> When I go to the linked address, the image shows up fine. When I try to load it on my development server at http://localhost:8000, it shows up fine. But when I try to load it on my production server at http://example.org, it doesn't show up, and the console shows "Failed to load resource: the server responded with a status of

403 Forbidden: directory index of “/path/to/files” is forbidden Nginx

十年热恋 提交于 2019-12-11 19:53:40
问题 I want to be really careful here because I just had to destroy my entire server and build again from scratch (total nightmare) because I tried fixing this error following advice such as sudo chown -R user:user * sudo chmod 755 [directory name] sudo chmod 644 * and ended up severely screwing up my permissions and breaking the whole Ubuntu system. I've also followed the advice from other similar questions to take out the second $uri from my Nginx config and that has not fixed the problem. My