ddev是否有可用的pimcore nginx配置?
我需要一个运行pimcore的ddev的nginx配置文件。我用皮姆科医生试过了 这里没有成功 得到: 无法重新启动xxxxxx:web容器失败:日志=,错误=容器/ddev-xxxxxx-web不健康 我确实在.ddev/nginx/server.conf中添加了一个配置文件。 ddev的版本是v1.10.2 pimcore的版本是最新的pimcore 5ddev是否有可用的pimcore nginx配置?,nginx,pimcore,ddev,Nginx,Pimcore,Ddev,我需要一个运行pimcore的ddev的nginx配置文件。我用皮姆科医生试过了 这里没有成功 得到: 无法重新启动xxxxxx:web容器失败:日志=,错误=容器/ddev-xxxxxx-web不健康 我确实在.ddev/nginx/server.conf中添加了一个配置文件。 ddev的版本是v1.10.2 pimcore的版本是最新的pimcore 5 upstream php-pimcore5 { server unix:/var/run/php-fpm.sock; } 我想
upstream php-pimcore5 {
server unix:/var/run/php-fpm.sock;
}
我想使用nginx服务器类型来更快地使用pimcore…我使用了这个.ddev/nginx-site.conf(基于中的配置),它似乎工作正常 顺便说一句,我以前从未使用过pimcore,但我能够
ddev配置--项目类型=php
- 将下面的文件放在.ddev/nginx-site.conf中
ddev composer创建pimcore/demo
ddev配置--docroot=web
ddev重启
- 使用
和ddev ssh
export-pimcore\u-Install\u-MYSQL\u-HOST\u-SOCKET=db:3306安装pimcore;供应商/bin/pimcore安装
# mime types are covered in nginx.conf by:
# http {
# include mime.types;
# }
map $http_x_forwarded_proto $fcgi_https {
default off;
https on;
}
server {
listen 80;
server_name _;
root $WEBSERVER_DOCROOT;
index index.php;
access_log /var/log/access.log;
error_log /var/log/error.log error;
# Pimcore Head-Link Cache-Busting
rewrite ^/cache-buster-(?:\d+)/(.*) /$1 last;
# Stay secure
#
# a) don't allow PHP in folders allowing file uploads
location ~* /var/assets/.*\.php(/|$) {
return 404;
}
# b) Prevent clients from accessing hidden files (starting with a dot)
# Access to `/.well-known/` is allowed.
# https://www.mnot.net/blog/2010/04/07/well-known
# https://tools.ietf.org/html/rfc5785
location ~* /\.(?!well-known/) {
deny all;
log_not_found off;
access_log off;
}
# c) Prevent clients from accessing to backup/config/source files
location ~* (?:\.(?:bak|conf(ig)?|dist|fla|in[ci]|log|psd|sh|sql|sw[op])|~)$ {
deny all;
}
# Some Admin Modules need this:
# Database Admin, Server Info
location ~* ^/admin/(adminer|external) {
rewrite .* /app.php$is_args$args last;
}
# Thumbnails
location ~* .*/(image|video)-thumb__\d+__.* {
try_files /var/tmp/$1-thumbnails$uri /app.php;
expires 2w;
access_log off;
add_header Cache-Control "public";
}
# Assets
# Still use a whitelist approach to prevent each and every missing asset to go through the PHP Engine.
location ~* ^(?!/admin/asset/webdav/)(.+?)\.((?:css|js)(?:\.map)?|jpe?g|gif|png|svgz?|eps|exe|gz|zip|mp\d|ogg|ogv|webm|pdf|docx?|xlsx?|pptx?)$ {
try_files /var/assets$uri $uri =404;
expires 2w;
access_log off;
log_not_found off;
add_header Cache-Control "public";
}
location / {
error_page 404 /meta/404;
add_header "X-UA-Compatible" "IE=edge";
try_files $uri /app.php$is_args$args;
}
# Use this location when the installer has to be run
# location ~ /(app|install)\.php(/|$) {
#
# Use this after initial install is done:
location ~ ^/app\.php(/|$) {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php-fpm.sock;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_intercept_errors off;
# fastcgi_read_timeout should match max_execution_time in php.ini
fastcgi_read_timeout 10m;
fastcgi_param SERVER_NAME $host;
fastcgi_param HTTPS $fcgi_https;
}
include /etc/nginx/monitoring.conf;
}
您需要在nginx配置中添加一个phpstatus节,请参阅。“webserver容器healthcheck需要位置~^/(phpstatus | ping)${块才能工作。”也有关闭healthcheck的方法。