我最近不得不重新安装Ubuntu和其他一切,因为我的SSD崩溃了.
我已经设置了Apache/MySQL/PHP并且可以正常访问localhost /.运行PHP和MySQL也很好.
我将我的项目保存在Dropbox文件夹中(自崩溃以来),/home/powerbuoy/Dropbox/Projects/并设置了VHOST,指向那里的一些项目.我也设置好了,/etc/hosts以便我可以访问我的项目http://project-name.dev.
但是,当我试图访问http://any-project.dev所有我得到的403 forbidden.我已经运行chmod -R 777 Projects/了,终端中的所有文件和文件夹现在都是绿色的.这没有用.
我检查了错误日志,他们说:
[crit] [client 127.0.0.1] (13)Permission denied: /home/powerbuoy/Dropbox/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
Run Code Online (Sandbox Code Playgroud)
但是在那里.htaccess任何地方甚至都不应该有文件.
我甚至设置了一个完全空的项目(/home/powerbuoy/Dropbox/Projects/test/index.php只<?php phpinfo()在里面),设置VHOST和http://test.devURL.我在这里得到了同样的错误.
有任何想法吗?
谢谢
编辑:我尝试将我的测试项目移动到桌面(/home/powerbuoy/Desktop/test/),现在它可以工作:P
也许它与Dropbox文件夹中的项目有关?
我正在制作一个使用谷歌搜索的程序,但我不能因为HTTP错误403是否有任何方法围绕它或任何我使用机械化浏览这里是我的代码
from mechanize import Browser
inp = raw_input("Enter Word: ")
Word = inp
SEARCH_PAGE = "https://www.google.com/"
browser = Browser()
browser.open( SEARCH_PAGE )
browser.select_form( nr=0 )
browser['q'] = Word
browser.submit()
Run Code Online (Sandbox Code Playgroud)
这是错误消息
Traceback (most recent call last):
File "C:\Python27\Project\Auth2.py", line 16, in <module>
browser.submit()
File "C:\Python27\lib\site-packages\mechanize\_mechanize.py", line 541, in submit
return self.open(self.click(*args, **kwds))
File "C:\Python27\lib\site-packages\mechanize\_mechanize.py", line 203, in open
return self._mech_open(url, data, timeout=timeout)
File "C:\Python27\lib\site-packages\mechanize\_mechanize.py", line 255, in _mech_open
raise response
httperror_seek_wrapper: HTTP Error 403: request disallowed by robots.txt
Run Code Online (Sandbox Code Playgroud)
请帮助,谢谢
Web服务器是LiteSpeed(查找phpinfo()).
表格将与textarea元素一起提交.
在textarea中输入简单文本时,表单将按预期提交.
但是对于某些词,显示403页面(LiteSpeed的403页).例如.退出,退出等
任何帮助表示赞赏.
无论我做什么,都无法通过公共IP地址访问本地wamp.我收到以下错误消息.
禁止您无权访问此服务器上的/.Apache/2.4.23(Win64)PHP/5.6.25服务器(我的公共IP)端口80
下面我已经粘贴了应该对此进行规范的httpd.cong部分.基本上一切似乎都没问题.
Wampserver使用自己的菜单项在线.
我已经尝试将下面的代码插入目录设置,但没有帮助.
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
Run Code Online (Sandbox Code Playgroud)
我错过了什么?谢谢.
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options …Run Code Online (Sandbox Code Playgroud) 当我从angular 2应用程序发送http post请求时,我收到403禁止错误.下面是form.component.ts和service.ts的代码.
form.component.ts
`import {Component, OnInit} from '@angular/core';
import { RegisterUser} from '../Model/RegisterUser';
import { RegisterService } from
'../Services/RegisterService';
@Component({
selector:'register-user-form',
templateUrl:'/app/Htmls/Register.html',
providers : [RegisterService]
})
export class RegisterUserComponent implements OnInit{
submitted=false;
constructor(private registerUserService : RegisterService ){
}
ngOnInit(){
}
onSubmit(value:RegisterUser){
this.registerUserService.pushUser(value).subscribe(
);
console.log(value) ;
}
}`
Run Code Online (Sandbox Code Playgroud)
以下是service.ts
import { Injectable } from '@angular/core';
import { Headers,Http, Response } from '@angular/http';
import { RegisterUser} from '../Model/RegisterUser';
import 'rxjs/add/operator/map';
@Injectable()
export class RegisterService {
private headers = new Headers({'content-type': 'application/json'}); …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用node-soap连接到 SOAP 服务,但获取403 - Forbidden.
我有一个 pfx 文件和一个密码,我正在尝试:
var pfx = fs.readFileSync(path.join(__dirname, 'folder', 'my.pfx')); // pfx file is in the relative path './folder/my.pfx'
var password = 'mypassword';
var options = {
strictSSL: true,
rejectUnauthorized: false,
hostname: myUrl,
forever: true
};
var security = new soap.ClientSSLSecurityPFX(pfx, password, options);
var url = 'https://theservice.com/ApplicationService.svc?singleWsdl';
soap.createClient(url, function (err, client) {
console.log(err);
console.log(client);
client.setSecurity(security);
});
Run Code Online (Sandbox Code Playgroud)
但我得到 403:
[Error: Invalid WSDL URL: https://theservice.com/ApplicationService.svc?singleWsdl
Code: 403
Response Body: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML …Run Code Online (Sandbox Code Playgroud) 我今天想第一次尝试 Pimcore。经过大量设置后,我成功使用 Composer 安装了demo-basic-twig 模板。
现在我尝试通过/admin访问后端。我注意到的第一件事是似乎没有加载 CSS 文件:
现在我认为可能只是一个错误或其他什么东西,但是当我尝试使用我创建的用户登录后端时,它只显示一个带有加载器的空白页面,没有发生任何事情:
我的控制台只返回一堆 403 错误:
Failed to load resource: the server responded with a status of 403 (Forbidden) | jquery-3.3.1.min.js:1
Failed to load resource: the server responded with a status of 403 (Forbidden) | icons.css:1
Failed to load resource: the server responded with a status of 403 (Forbidden) | leaflet.css:1
Run Code Online (Sandbox Code Playgroud)
我想我的安装过程中做错了什么?
I am posting a request to a website:
request = (HttpWebRequest)WebRequest.Create("https://www.footlocker.dk/api/users/carts/current/entries?timestamp=1611595223668");
request.Method = "POST";
using (var streamWriter = new StreamWriter(request.GetRequestStream()))
{
string json = "{\"user\":\"test\"," + "\"password\":\"bla\"}";
streamWriter.Write(json);
}
var httpResponse = (HttpWebResponse)request.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var result = streamReader.ReadToEnd();
}
Run Code Online (Sandbox Code Playgroud)
When I submit this request, I am getting a 403 forbidden, with following html:
<html>
<head>
<title>footlocker.dk</title>
<style>
#cmsg{animation: A 1.5s;}@keyframes A{0%{opacity:0;}99%{opacity:0;}100%{opacity:1;}}
</style>
</head>
<body style="margin:0">
<p id="cmsg">Please enable JS and disable any ad blocker</p> …Run Code Online (Sandbox Code Playgroud) 我在反向代理模式下使用最新的 docker 映像,
我不断收到相同的消息 403 禁止,我认为原因是 ModSecurity 映像尝试使用其 ip 直接访问该站点,而不使用主机标头
我该如何解决?