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

Oyabi's questions

Martin Hope
Oyabi
Asked: 2021-05-05 11:06:30 +0800 CST

CreateContainerError:超出上下文期限

  • 1

对于一个项目,我必须使用大容器(500Mb 到 60Gb)。

我没有精确的测量值,但是当我使用 gitlab-runner 运行大于 3-5Gb 的容器时,我在 rancher 中遇到错误:CreateContainerError: context deadline exceeded

我们的 kubernetes 集群是使用 rke 构建的,rancher 作为 web ui 并位于我们的数据中心。

该错误仅在 gitlab-runner 中出现,如果我docker run ...在 kubernetes 节点上启动,一切正常。

也许某处有超时?

你们有没有人遇到过这个问题?

谢谢你。

docker kubernetes gitlab helm rancher-2
  • 1 个回答
  • 4247 Views
Martin Hope
Oyabi
Asked: 2015-04-24 07:36:31 +0800 CST

从 Puppet 中的 hiera 哈希中获取值

  • 1

我的 hiera 文件中有这个结构,它在我的 smb.conf 中创建了一些规​​则。

samba::shares:
  PDF:
    - comment = "PDF"
    - path = /home/smb/pdf
    - browseable = yes
    - hide dot files = yes
    - read only = no
    - public = yes
    - writable = yes
    - create mode = 0775
    - printable = no
  Partage:
   - comment= "Partage"
   - path = /home/smb/Partage
   - browseable = yes
   - hide dot files = yes
   - read only = no
   - public = yes
   - writable = yes
   - create mode = 0775
   - printable = no

我想访问每个共享的路径以自动创建具有正确权限的文件夹。

我用 hiera_hash() 尝试了许多解决方案,但找不到正确的设置。:

define create_folder{
  # I want to loop on PDF, Partage, etc. and extract path 
  # for each one (/home/smb/pdf, /home/smb/Partage, etc.).
  $path = hiera_hash('path') 

  file{"$path":
    path => $path,
    ensure => diretory,
    owner => "smb",
    group => "smb",
    require => File["/home/smb/"],
    mode => '775',
  }
}

你能帮我吗 ?

问候。

puppet
  • 2 个回答
  • 1839 Views
Martin Hope
Oyabi
Asked: 2014-05-07 03:12:01 +0800 CST

Nginx + php-fpm 和多域

  • 1

我有 3 个域名、1 个服务器和 1 个 IPv4 和 1ipv6。我已经为我的 ipv4 设置了记录(我现在不使用 IPv6)。我的 3 个网站使用 Wordpress。我已经为域配置了 Nginx 和 php-fpm。

/etc/nginx/conf.d/php5-fpm :

upstream php5-fpm-sock {
        server unix:/var/run/php5-fpm.sock; }

/etc/nginx/sites-available/domain.com.conf :

server {
    listen       80;
    server_name  domain.com;

    root /var/www/domain.com;
    index index.php index.html;

    #charset koi8-r;
    access_log  /var/log/nginx/domain.com.access.log;
    error_log /var/log/nginx/domain.com.error.log;

    #include global/common.conf;
    #include global/wordpress.conf;

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

        location ~ \.php$ {
                try_files $uri =404;
                fastcgi_index index.php;
                fastcgi_pass php5-fpm-sock;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include /etc/nginx/fastcgi_params;
        }
}

/etc/nginx/sites-available/totaly-different-domain.com.conf :

server {
    listen       80;
    server_name  totaly-different-domain.com;

    root /var/www/totaly-different-domain.com;
    index index.php index.html;

    #charset koi8-r;
    access_log  /var/log/nginx/totaly-different-domain.com.access.log;
    error_log /var/log/nginx/totaly-different-domain.com.error.log;


    #include global/common.conf;
    #include global/wordpress.conf;

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

        location ~ \.php$ {
                try_files $uri =404;
                fastcgi_index index.php;
                fastcgi_pass php5-fpm-sock;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include /etc/nginx/fastcgi_params;
        }
}

问题:当我输入 domain.com 时域 1 出现在我的导航器上,当我输入 totaly-different-domain.com 时也会出现。

  • domain.com -> 显示 domain.com
  • 完全不同的 domain.com -> 显示 domain.com

PS:我知道我可以优化它,但我想了解为什么我之前遇到过这个问题。

更新 1:

这是我的工作文件:

/etc/nginx/sites-available/domain.com.conf :

server {
    server_name domain.com www.domain.com;

    root /var/www/domain.com/;
    index index.php index.html;

    access_log  /var/log/nginx/domain.com.access.log;
    error_log /var/log/nginx/domain.com.error.log;

    include global/common.conf;
    include global/wordpress.conf;

}

/etc/nginx/sites-available/totaly-different-domain.com.conf :

server {
    server_name totaly-different-domain.com www.totaly-different-domain.com;

    root /var/www/totaly-different-domain.com/;
    index index.php index.html;

    access_log  /var/log/nginx/totaly-different-domain.com.access.log;
    error_log /var/log/nginx/totaly-different-domain.com.error.log;

    include global/common.conf;
    include global/wordpress.conf;

}

/etc/nginx/global/common.conf :

# Global configuration file.
# ESSENTIAL : Configure Nginx Listening Port
listen 80;

# ESSENTIAL : Default file to serve. If the first file isn't found,
index index.php index.html index.htm;

# ESSENTIAL : no favicon logs
location = /favicon.ico {
    log_not_found off;
    access_log off;
}

# ESSENTIAL : robots.txt
location = /robots.txt {
    allow all;
    log_not_found off;
    access_log off;
}

# ESSENTIAL : Configure 404 Pages
error_page 404 /404.html;

# ESSENTIAL : Configure 50x Pages
error_page 500 502 503 504 /50x.html;
location = /50x.html {
    root /usr/share/nginx/www;
}

# SECURITY : Deny all attempts to access hidden files .abcde
location ~ /\. {
    access_log off;
    log_not_found off;
    deny all;
}

# PERFORMANCE : Set expires headers for static files and turn off logging.
location ~* ^.+\.(js|css|swf|xml|txt|ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|$
    access_log off;
    log_not_found off;
    expires 30d;
}

/etc/nginx/global/wordpress.conf :

# WORDPRESS : Rewrite rules, sends everything through index.php and keeps the a$
location / {
    try_files $uri $uri/ /index.php?$args;
}

# SECURITY : Deny all attempts to access PHP Files in the uploads directory
location ~* /(?:uploads|files)/.*\.php$ {
    deny all;
}

# REQUIREMENTS : Enable PHP Support
location ~ \.php$ {
    # SECURITY : Zero day Exploit Protection
    try_files $uri =404;

    fastcgi_index index.php;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass php5-fpm-sock;

    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include /etc/nginx/fastcgi_params;
}
nginx
  • 2 个回答
  • 3774 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