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-6077

James's questions

Martin Hope
James
Asked: 2020-07-21 14:47:05 +0800 CST

配置 Kubernetes 入口

  • 0

我正在尝试将 Google Kubernetes Engine Ingress 正确配置为在端口 3000 上运行的负载平衡 Docker 应用程序。我显然在某个地方犯了一个明显的错误,但我不知道在哪里。Ingress 总是说机器不健康,但我能够验证 Web 应用程序正在运行并在 0.0.0.0:3000 上侦听。

除了所述问题之外,我的配置中的任何其他明确的陷阱也值得赞赏。

当前设置如下所示:

部署.yml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: web
spec:
  replicas: 1
  selector:
    matchLabels:
      app: web
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
  minReadySeconds: 5
  template:
    metadata:
      labels:
        app: web
    spec:
      containers:
      - name: cloud-sql-proxy
        image: gcr.io/cloudsql-docker/gce-proxy:1.17
        command:
          - "/cloud_sql_proxy"
          - "-ip_address_types=PRIVATE"
          - "-instances=project:us-central1:postgres=tcp:5432"
        securityContext:
          runAsNonRoot: true
      - name: web
        image: gcr.io/PROJECT_ID/IMAGE:TAG
        ports:
        - containerPort: 3000
        env:
        - name: MASTER_KEY
          valueFrom:
            secretKeyRef:
              name: masterkey
              key: MASTER_KEY
        resources:
          requests:
            cpu: 100m
          limits:
            cpu: 100m

网络服务.yml

apiVersion: v1
kind: Service
metadata:
  name: web-service
spec:
  selector:
    app: web
  type: NodePort
  ports:
    - port: 3000
      targetPort: 443
      protocol: TCP
      name: https

网络入口.yml

apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: web-ingress
  annotations:
    kubernetes.io/ingress.global-static-ip-name: staging-cluster
    networking.gke.io/managed-certificates: cloudflare-origin
spec:
  rules:
  - host: staging.mydomain.com
    http:
      paths:
      - backend:
        serviceName: web-service
        servicePort: 443

cloudflare-origin.yml *

apiVersion: networking.gke.io/v1beta2
kind: ManagedCertificate
metadata:
  name: cloudflare-origin
spec:
  domains:
    - staging.mydomain.com

计算地址.yml

apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeAddress
metadata:
  name: staging-cluster
spec:
  location: global

定制化.yml

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- gke/deployment.yml
- gke/config-connector.yml
- gke/compute-address.yml
- gke/cloudflare-origin.yml
- gke/web-service.yml
- gke/web-ingress.yml
docker kubernetes google-kubernetes-engine containers ingress
  • 1 个回答
  • 210 Views
Martin Hope
James
Asked: 2010-02-07 03:17:00 +0800 CST

PHP FastCGI/XML/DOM 配置

  • 0

伙计们,任何想法为什么当我配置 PHP 5.3.1 时,这些选项会失败?

Notice: Following unknown configure options were used:

--with-xml
--with-dom
--enable-fastcgi
--enable-discard-path
--enable-force-cgi-redirect
php fastcgi php5
  • 1 个回答
  • 430 Views
Martin Hope
James
Asked: 2010-02-06 10:52:30 +0800 CST

重复的 PHP 安装

  • 0

从安装 5.2.6 开始,然后继续安装 5.3.1,但 SSH php 现在运行的是 5.3.1,而不是覆盖,而 Web 服务器仍然使用 5.2.6 安装提供内容。

关于如何纠正这个问题的任何想法?我基本上需要找到两个单独安装的位置并且正确,但我只能在 /usr/bin/ 中找到 5.3.1

伙计们需要很大的帮助:)

CentOS 2.6.9,Lighttpd

[root@server ~]# rpm -qa |grep php
php-gd-5.2.6-1.el5.art
php-imap-5.2.6-1.el5.art
php-snmp-5.2.6-1.el5.art
php-mbstring-5.2.6-1.el5.art
php-ldap-5.2.6-1.el5.art
php-cli-5.2.6-1.el5.art
php-xmlrpc-5.2.6-1.el5.art
php-mysql-5.2.6-1.el5.art
php-common-5.2.6-1.el5.art
php-ncurses-5.2.6-1.el5.art
php-pdo-5.2.6-1.el5.art
php-xml-5.2.6-1.el5.art
php-odbc-5.2.6-1.el5.art
php-mhash-5.2.6-1.el5.art
php-mcrypt-5.2.6-1.el5.art
[root@server ~]# php -v
PHP 5.3.1 (cli) (built: Nov 26 2009 03:27:03)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies
php php5 php53
  • 1 个回答
  • 227 Views
Martin Hope
James
Asked: 2009-10-11 12:48:44 +0800 CST

Lighttpd 子域

  • 3
$HTTP["host"] == "example.com" {
    server.document-root        = "/var/www/vhosts/example.com/httpdocs/development/api"
    server.errorlog         = "/var/log/lighttpd/error.log"
    accesslog.filename          = "/var/log/lighttpd/access.log"
}

$HTTP["host"] == "api.example.com" {
    server.document-root        = "/var/www/vhosts/example.com/httpdocs/development/api"
    server.errorlog         = "/var/log/lighttpd/error.log"
    accesslog.filename          = "/var/log/lighttpd/access.log"
}

$HTTP["host"] == "example.org" {
    server.document-root        = "/var/www/vhosts/example.com/httpdocs/development/services"
    server.errorlog         = "/var/log/lighttpd/error.log"
    accesslog.filename          = "/var/log/lighttpd/access.log"
}

以上是我的 lighttpd.conf 的摘录。example.com 和 example.org 工作正常。知道为什么 api.example.com 拒绝工作吗?

谢谢!

subdomain
  • 1 个回答
  • 2289 Views
Martin Hope
James
Asked: 2009-10-06 17:12:45 +0800 CST

Lighttpd 虚拟主机

  • -2

好吧,伙计们,我一团糟。

在这里查看我的 lighttpd.conf,http://pastebin.com/m4c398259。

我真的不知道,我已经阅读了尽可能多的教程并尝试了尽可能多的教程。但这超出了我的技能水平。有人帮我改写我的烂摊子以容纳我希望托管的两个域:)

非常感谢你们。诚实地。

virtualhost
  • 1 个回答
  • 271 Views
Martin Hope
James
Asked: 2009-08-18 17:41:12 +0800 CST

删除尾随斜杠 Lighttpd url

  • 1

一个奇怪的请求,但我真的需要这个回答。你们能帮我使用重写规则从 Lighttpd.conf 中的 url 中删除尾部斜杠吗?

例如:

**A** www.example.com/page/
**B** www.example.com/page

我希望将 url A 强制转换为 url B 的语义。

非常感谢。

rewrite lighttpd
  • 3 个回答
  • 1846 Views
Martin Hope
James
Asked: 2009-07-11 13:17:37 +0800 CST

mstmp,谷歌应用

  • 0

我将 Google Apps 用于我的域电子邮件,但我应该使用 mstmp 并将其连接到通过 Google Apps 发送吗?我问这个的原因是如果我必须发送大量电子邮件,例如人们快速连续注册我的网站并接收电子邮件,或者批量发送电子邮件,谷歌会支持/允许吗?

谢谢。

email smtp g-suite
  • 1 个回答
  • 321 Views
Martin Hope
James
Asked: 2009-06-30 09:00:55 +0800 CST

mysqld 问题

  • 0

mysqld 的以下用法似乎不正确,还有那个时间戳!有人知道为什么会这样疯狂吗?

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
25662 mysql     16   0  139m  30m 5256 S 88.9  1.7 312:17.23 mysqld
20200 apache    16   0  102m  14m 7548 S  5.0  0.8   0:01.42 httpd

当谈到 mysql、Apache 和 Lighttpd 配置时,我完全是新手,但 mysql 完全一无所知。下面是我的 my.conf。我在具有 2GB 内存并使用 InnoDB 的机器上运行,通过 PDO 连接。

[mysqld]
set-variable=local-infile=0
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

完全默认从头开始并避免错误,帮助!:)

mysql
  • 4 个回答
  • 327 Views
Martin Hope
James
Asked: 2009-06-25 05:19:44 +0800 CST

Lighttpd 无法创建 php-fastcgi.socket

  • 5

我已经使用 yum 安装了 FastCGI,并编辑了我的 lighttpd.conf,但是在重新启动服务器时我收到了这个错误。

2009-06-24 12:44:43: (log.c.97) server started 
2009-06-24 12:44:43: (mod_fastcgi.c.924) bind failed for: unix:/var/run/lighttpd/php-fastcgi.socket-0 No such file or directory 
2009-06-24 12:44:43: (mod_fastcgi.c.1365) [ERROR]: spawning fcgi failed. 
2009-06-24 12:44:43: (server.c.902) Configuration of plugins failed. Going down. 

我的 lighttpd.conf 的相关部分是:

fastcgi.server             = ( ".php" =>
                               ( "localhost" =>
                                 (
                                  #"socket" => "/var/run/lighttpd/php-fastcgi.socket",
                                  #"bin-path" => "/usr/bin/php-cgi"
                                   "socket" => "/tmp/php-fastcgi.socket",
                                   "bin-path" => "/usr/bin/php-cgi"
                                 )
                               )
                            )

非常感谢。

php fastcgi lighttpd
  • 6 个回答
  • 17388 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