jkribeiro/drupal-composer-paranoia-acquia
Composer 安装命令:
composer require jkribeiro/drupal-composer-paranoia-acquia
包简介
Composer plugin to improve the security of composer-based Drupal projects by moving all PHP files out of docroot for Acquia Environments.
README 文档
README
Composer plugin for improving the website security for composer-based Drupal projects by moving all PHP files out of docroot, for Acquia environments.
This plugin has the dependency of the drupal-paranoia plugin, performing additional installation steps to run the paranoia mode on Acquia Cloud environments.
Would like to know more about it?
- https://github.com/drupal-composer/drupal-paranoia
- Moving all PHP files out of the docroot
- #1672986: Option to have all php files outside of web root
- Remote Code Execution - SA-CONTRIB-2016-039
- https://twitter.com/drupalsecurity/status/753263548458004480
Configuration
Make sure you have a drupal-composer/drupal-project-based project created.
Rename your Acquia repo docroot directory to app.
mv docroot app
Update the composer.json of your root package with the following changes:
"extra": { "installer-paths": { "app/core": ["type:drupal-core"], "app/libraries/{$name}": ["type:drupal-library"], "app/modules/contrib/{$name}": ["type:drupal-module"], "app/profiles/contrib/{$name}": ["type:drupal-profile"], "app/themes/contrib/{$name}": ["type:drupal-theme"], "drush/contrib/{$name}": ["type:drupal-drush"] }, "drupal-paranoia": { "app-dir": "app", "web-dir": "docroot" } "..." }
Use composer require ... to install this Plugin on your project.
composer require jkribeiro/drupal-composer-paranoia-acquia:~1
Run the following commands to make sure that the new folders are installed:
composer drupal:paranoia
composer drupal:paranoia-acquia
Done! Plugin and new docroot are now installed.
Folder structure
Your project now is basically structured on two folders.
- app: Contains the files and folders of the full Drupal installation.
- docroot: Contains only the symlinks of the assets files and the PHP stub files from the
appfolder.
Every time that you install or update a Drupal package via Composer, the docroot folder is automatically recreated.
If necessary, you can rebuild it manually, running the command
composer drupal:paranoia
This could be necessary when updating themes images, CSS and JS files.
Last step is to commit and push the changes to Acquia Cloud git repository.
jkribeiro/drupal-composer-paranoia-acquia 适用场景与选型建议
jkribeiro/drupal-composer-paranoia-acquia 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.05M 次下载、GitHub Stars 达 3, 最近一次更新时间为 2017 年 12 月 11 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 jkribeiro/drupal-composer-paranoia-acquia 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 jkribeiro/drupal-composer-paranoia-acquia 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 2.05M
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 22
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0
- 更新时间: 2017-12-11