AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-238494

Michael's questions

Martin Hope
Michael
Asked: 2020-11-28 05:22:30 +0800 CST

我需要同时使用 Openstack 的密钥对和 cloud-init 的 ssh_authorized_keys 吗?

  • 0

我有一个使用 Terraform 和 Openstack 的旧设置。通过 Terraform 将有密钥对注入 Openstack 实例:

resource "openstack_compute_instance_v2" "bamboo_agent" {
  name               = var.agents[count.index].name
  image_name         = "${var.image}"
  flavor_name        = "${var.flavor}"
  key_pair           = "${openstack_compute_keypair_v2.bamboo_ssh[0].name}"
  user_data          = "${file("scripts/init_instance.cfg")}"
  network {
    port             = "${openstack_networking_port_v2.bamboo[count.index].id}"
  }
  count= length(var.agents)
}

在scripts/init_instance.cfg中将添加键:

ssh_authorized_keys:
  - ssh-rsa ...

AFAIK 两种方法都在做同样的事情,对吧?我需要两者吗?删除其中一个还不够吗?

我想删除密钥对并将密钥添加ssh_authorized_keys到默认帐户并添加users:到 cloud-init 中的其他帐户。

terraform openstack
  • 1 个回答
  • 651 Views
Martin Hope
Michael
Asked: 2020-07-04 01:17:41 +0800 CST

使用 rpm 应用程序(不是 yum)使用 Ansible 安装 rpm 包

  • 0

我想使用 Ansible 和已安装的 rpm 包管理器安装一些 RPM 包。yum 没有安装。

如果软件包已经安装,使用commandmodule with会导致任务失败。rpm -i {{package}}我正在寻找一种惯用的方式来安装像 yum 或 apt 模块这样的软件包。

aix rpm ansible
  • 4 个回答
  • 5876 Views
Martin Hope
Michael
Asked: 2019-08-03 00:36:37 +0800 CST

如何使用 Let's Encrypt 设置 DKIM?

  • 1

很长一段时间以来,我都在为我的所有加密服务(HTTPS、IMAPS、SMTPS、FTPS)使用 Let's encrypt。现在我想为我的邮件服务器添加 DKIM 签名。但这可能使用 Let's Encrypt 吗?我必须在 DKIM DNS 条目中添加公钥。但是 Let's Encrypt 证书每 30 天新创建一次。

如何将我的 Let's Encrypt 证书用于 DKIM?

(我知道如何在邮件服务器中设置 DKIM。我的问题集中在 DKIM 的 DNS 条目上)

domain-name-system
  • 1 个回答
  • 1857 Views
Martin Hope
Michael
Asked: 2016-09-14 05:00:34 +0800 CST

如何将所有 HTTP 请求重定向到 HTTPS 并将所有不存在的子域重定向到一个特定域

  • 0

我已经有一个可以将所有不存在的子域重定向到特定域的工作配置。现在我想添加一个配置,将所有 HTTP 请求重定向到同一域上的 HTTPS。

此配置文件执行子域重定向:

# redirect any non-existent subdomain (blah.domain.de -> domain.de)
server {
    listen 80 default_server;
    listen [::]:80 default_server;
    server_name _;
    return 301 https://domain.de$request_uri;
}

这是我尝试用于 HTTP->HTTPS 的配置:

# redirect any HTTP request to its HTTPS address (http://domain.de/blub -> https://domain.de/blub)
server {
    listen 80 default_server;
    listen [::]:80 default_server;
    server_name domain.de mail.domain.de admin.domain.de;
    return 301 https://$server_name$request_uri;
}

但这不起作用,因为 default_server 被定义了两次。如何将这两个功能结合起来?

我真的必须将第二个配置添加到每个子域配置吗?

nginx
  • 3 个回答
  • 364 Views
Martin Hope
Michael
Asked: 2016-02-03 00:52:22 +0800 CST

Nginx 中的 PHP 7 和 5.6 并行

  • 1

我想将 PHP 7 与较新的应用程序一起使用,将 PHP 5.6 与应用程序一起使用,这不适用于 PHP 7。所以我尝试配置 Nginx 以为不同的路径启用不同的 PHP 版本。但它不起作用:

 # should enable PHP5 for all PHP-scripts under /vexim/ path
 location ^~ /vexim/.*\.php$ {
     include snippets/fastcgi-php.conf;
     fastcgi_pass unix:/var/run/php5-fpm.sock;
 }

其他任何东西的默认值都应该是 PHP 7:

location ~ \.php$ {
    include snippets/fastcgi-php.conf;
    fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
}

使用此配置,/vexim/ 下的 PHP 脚本根本不会被解析。如何让它与不同的路径和 PHP 版本一起工作?

(使用 Debian 8.3 Jessie、Nginx 1.8.1 (dotdeb)、PHP 5.6、PHP 7 (dotdeb))

nginx
  • 1 个回答
  • 1082 Views
Martin Hope
Michael
Asked: 2016-02-02 04:08:30 +0800 CST

让 Nginx 使用 /index.php/something

  • 0

我正在尝试从 Apache 迁移到 Nginx。我正在使用 Nginx 1.8.1 和 PHP 5.6

Apache 接受这样的 URL:

domain.com/site/index.php/something

并使用参数 /something 调用 index.php 脚本。这就是我的 Wordpress 的工作方式,但还有其他依赖的脚本。

例如我可以这样做:

domain.com/path/script.php/someparameter

我怎样才能让它在 Nginx 中工作?

编辑:我找到了 Wordpress 的解决方案:

location /blog/ {
    try_files $uri $uri/ /blog/index.php?$args;
}

但是什么是所有脚本的通用解决方案?

nginx
  • 1 个回答
  • 196 Views
Martin Hope
Michael
Asked: 2014-11-04 07:07:13 +0800 CST

OTRS 中的大规模禁用客户

  • 0

问题在于OTRS客户。我不能使用外部客户后端,所以我想通过 CSV 文件更新客户数据库。我已经编写了一个脚本来通过otrs.AddCustomerUser.pl.

但是如何通过脚本批量禁用老客户?

php
  • 1 个回答
  • 639 Views
Martin Hope
Michael
Asked: 2014-10-17 00:54:52 +0800 CST

使用 Adob​​e Reader XI 设置“使 Reader 成为默认 PDF 查看器”的问题

  • 2

我对 Adob​​e Reader XI 进行了静默部署,并且设置未将 Adob​​e Reader 设置为默认 PDF Reader。

我可以手动设置默认阅读器,但必须自动完成。

我试过了:

msiexec /i  "AcroRead.msi" /q TRANSFORMS="TransformFile.mst" 
msiexec /i  "AcroRead.msi" /q TRANSFORMS="TransformFile.mst" IW_DEFAULT_VERB=Read
msiexec /i  "AcroRead.msi" /q IW_DEFAULT_VERB=Read

Adobe Reader 可以正常安装,但不会将自己设置为默认阅读器。我必须手动打开阅读器并再次在设置中进行设置。但这是不切实际的。

另一个用户在这里描述了同样的问题。有人知道如何解决吗?

deployment
  • 1 个回答
  • 1400 Views
Martin Hope
Michael
Asked: 2014-08-26 02:32:16 +0800 CST

从远程 Windows 7 PC 查询服务非常慢

  • 4

当我从远程 Windows 7 PC 查询已安装的服务时,速度非常慢。使用远程 Windows XP PC 总是很快的。

例如,在我的 Windows 7 PC 中,命令

sc \\pc1 query type= service

使用 Windows 7 远程 PC 需要 21 秒。使用 Windows XP 远程 PC 可以立即完成。我可以用我们的任何 PC 重现这种行为。其他工具也会出现这种情况(例如 Hyena) 有人知道是什么让请求如此缓慢,或者如何让它像 Windows XP 一样即时?

windows
  • 3 个回答
  • 4540 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve