【问题标题】:403 Forbidden error for kubernetes for drupal+postgresqldrupal+postgresql 的 kubernetes 的 403 Forbidden 错误
【发布时间】:2022-08-02 19:19:25
【问题描述】:

在 GCP 中使用 PostgreSQL 托管 drupal 这是我的资源:

我试图输入我的外部 IP 以查看门户但收到 403 Forbidden 错误。像这样:

我尝试了kubectl create clusterrolebinding cluster-system-anonymous --clusterrole=cluster-admincl --user=system:anonymous 命令来配置角色,但它不起作用。作为一名学生,我只是在学习这些东西,我不明白这些东西是如何工作的。 任何人都可以帮我简要解释一下它是如何不工作的以及是什么原因造成的?

Postgres 部署文件:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: postgres-deployment
  labels:
    app: postgres
spec:
  replicas: 1
  selector:
    matchLabels:
      app: postgres
  template:
    metadata:
      labels:
        app: postgres
    spec:
      containers:
        - name: postgres
          image: postgres:latest
          ports:
            - containerPort: 3306
          volumeMounts:
            - mountPath: \"/var/lib/postgres\"
              subPath: \"postgres\"
              name: postgres-data
          env:
            - name: POSTGRES_USER
              valueFrom:
                secretKeyRef:
                  name: postgres-secrets
                  key: USER_NAME       
            - name: POSTGRES_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: postgres-secrets
                  key: ROOT_PASSWORD
      volumes:
        - name: postgres-data
          persistentVolumeClaim:
            claimName: task-pv-claim

    标签: postgresql kubernetes google-cloud-platform drupal http-status-code-403


    【解决方案1】:

    如果这个 403 错误可能是由于 drupal 安装,请从 .htaccess 文件中删除以下行并检查问题是否已解决。如果它仍然存在,请查找此文档以解决 403 error

    从 .htaccess 文件中删除以下行:

    选项 - 索引

    选项 FollowSymLinks-

    403 Forbidden error with Drupal after install

    【讨论】:

      猜你喜欢
      • 2016-04-05
      • 1970-01-01
      • 1970-01-01
      • 2022-01-16
      • 1970-01-01
      • 2019-05-26
      • 2020-09-07
      • 2014-02-17
      • 2021-01-24
      相关资源
      最近更新 更多