AllowOverride All Cloud Engine模板 [英] AllowOverride All Cloud Engine template

查看:66
本文介绍了AllowOverride All Cloud Engine模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用启动器在Google Cloud上运行WordPress高可用性,并且AllowOverride All出现问题.我可以在内容组实例上手动设置它,但是当创建另一个实例来处理流量时,新实例在/etc/apache2/sites-enabled/wordpress.conf上没有AllowOverride All. 我尝试将其添加到WordPress根文件夹中的.htaccess上,该文件夹将同步到所有实例,但不起作用.

I am trying to run WordPress high availability on Google Cloud with the launcher and I get a problem with the AllowOverride All. I can set it manually on the content group instance but when another instance is created to handle the traffic, the new instance does not have the AllowOverride All on /etc/apache2/sites-enabled/wordpress.conf. I tried adding it in the .htaccess on the root WordPress folder that will sync to all the instances but it does not work.

还有其他替代方法可以将其添加到WordPress中以使永久链接正常工作吗?

Is there any other alternative to add it to WordPress to get permalink working ?

谢谢

推荐答案

您可以设置启动实例模板中的脚本.编写一个脚本,用所需的内容覆盖wordpress.con文件,该脚本将在每个实例的启动时执行.

You can set a startup script in your instance template. Write a script that overrides the wordpress.con file with the content that you want and it will get executed on every instance's startup.

在运行 WordPress高可用性解决方案/marketplace/"rel =" nofollow noreferrer> GCP市场,因此由实例组使用模板来管理实例创建.整个更新过程如下所示:

As you are running the WordPress High Availability solution from the GCP Marketplace, so the instance creation is managed by an instance group using a template. The whole update process would be something like the following:

  1. 在GCP控制台下的实例组菜单中计算引擎.
  2. 确定属于WordPress高可用性部署的实例组,然后单击模板名称
  3. 复制模板.现在,您可以在management下编辑启动脚本.可能已经有一个脚本,只需添加您的脚本即可.为模板命名并保存.
  4. 现在,要更新实例组要使用新模板,请编辑实例组并更改其使用的模板.之后,您需要单击Rolling update按钮以实际更新实例.
  1. Go to the instance groups menu in your GCP Console, under Compute Engine.
  2. Identify the instance groups that belong to the WordPress high availability deployment and click in the template name
  3. Copy the template. Now you can edit the startup script under management. There might be a script already, just add yours. Give the template a name and save it.
  4. Now, to update the instance group to use the new template, edit the instance group and change the template it uses. After that you'll need to click the Rolling update button to actually update the instances.

这篇关于AllowOverride All Cloud Engine模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆