几个月前我曾经工作过Let's加密证书(使用旧的letsencrypt客户端).我使用的服务器是nginx.
Certbot正在创建.well-known文件夹,但不是acme-challenge文件夹
现在我尝试通过创建新证书 ~/certbot-auto certonly --webroot -w /var/www/webroot -d domain.com -d www.domain.com -d git.domain.com
但我总是得到这样的错误:
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: git.domain.com
Type: unauthorized
Detail: Invalid response from
http://git.domain.com/.well-known/acme-challenge/ZLsZwCsBU5LQn6mnzDBaD6MHHlhV3FP7ozenxaw4fow:
"<.!DOCTYPE html>
<.html lang='en'>
<.head prefix='og: http://ogp.me/ns#'>
<.meta charset='utf-8'>
<.meta content='IE=edge' http-equiv"
Domain: www.domain.com
Type: unauthorized
Detail: Invalid response from
http://www.domain.com/.well-known/acme-challenge/7vHwDXstyiY0wgECcR5zuS2jE57m8I3utszEkwj_mWw:
"<.html>
<.head><.title>404 Not Found</title></head>
<.body bgcolor="white">
<.center><.h1>404 Not Found</h1></center>
Run Code Online (Sandbox Code Playgroud)
(当然HTML标签内的点不是真的存在)
我找了一个解决方案,但还没找到.有谁知道为什么certbot没有创建文件夹?
提前致谢!
我正在尝试使用JavaScript中的本机FileAPI构建文件上传器,我想通过XMLHttpRequest(不带jQuery)将文件上传到使用Express.js的Node.js服务器.
文件读取部分工作正常,当我上传没有XMLHttpRequest的文件时,它工作正常(文件在Express.js 中的req.files).
问题是通过AJAX上传:req.files总是空的.
下面是一些代码:
表格:
<form action="http://localhost:3000/upload" method="POST" enctype="multipart/form-data" name="form">
<input type="file" name="uploads" id="files" multiple="multiple">
<input type="submit" name="submit" value="submit">
</form>
Run Code Online (Sandbox Code Playgroud)
前端的上传部分(在文件[0] .data中是一个文件 - 不是数组或其他东西):
function uploadFiles(files) {
var xhr = new XMLHttpRequest();
xhr.submittedData = files; // Array of objects with files included. But it neither works with an array of files nor just one file
xhr.onload = successfullyUploaded;
xhr.open("POST", "http://localhost:3000/upload", true);
xhr.setRequestHeader('X-Requested-With','XMLHttpRequest');
xhr.send();
}
Run Code Online (Sandbox Code Playgroud)
发生问题的后端:
exports.receiveUpload = function(req, res){
console.log(req.files); // empty
var files = …Run Code Online (Sandbox Code Playgroud) 在过去的几周里,我遇到的问题是在iTerm2中,闭合的大括号不再起作用了.它适用于所有其他应用程序(包括终端),但iTerm2没有显示大括号.开口花括号工作.
我有一个德国键盘,所以它应该是ALT + 9
我卸载了shell集成,因为我认为这个问题发生在安装集成之后,但到目前为止还没有成功.
有任何想法如何解决这个问题?
我想将SVG图像导入到一个用TypeScript编写并与Webpack捆绑在一起的React小应用程序中。问题在于没有显示图像(只有浏览器的后备图像没有找到图像)。似乎数据URL是错误的,因为当我在base64解码器中复制数据URL时,图像已损坏。
我尝试了不同的Webpack加载器(URL加载器,文件加载器,svg加载器...)
webpack.config.json
module: {
rules: [
{
test: /\.svg$/,
loader: 'url-loader'
}
]
}
Run Code Online (Sandbox Code Playgroud)
tsd.d.ts
declare module "*.svg" {
const content:string;
export default content;
}
Run Code Online (Sandbox Code Playgroud)
App.tsx
import content from './logo.svg';
class App extends React.Component {
render() {
<div>
<img src={content} />
</div>
}
}
Run Code Online (Sandbox Code Playgroud)
有什么想法要改变吗?
提前致谢!
javascript ×2
certbot ×1
express ×1
file-upload ×1
https ×1
iterm2 ×1
lets-encrypt ×1
macos ×1
nginx ×1
node.js ×1
reactjs ×1
shell ×1
svg ×1
typescript ×1
webpack ×1
zsh ×1