简体   繁体   English

将域指向Bitnami Wordpress多站点实例的目录

[英]Point Domain to directory of a Bitnami Wordpress Multi-Site Instance

I am using a Wordpress Multi-site instance on AWS Lightsail and have a couple different Wordpress sites hosted with no issues (in the same instance). 我正在AWS Lightsail上使用Wordpress多站点实例,并且托管了几个不同的Wordpress站点(在同一实例中)没有问题。

I would like to host another website to the same Bitnami instance, but this domain does NOT have a Wordpress site. 我想将另一个网站托管到同一Bitnami实例,但是该域没有Wordpress网站。 It is just a standard PHP website. 这只是一个标准的PHP网站。

I assume that I need to point the nameservers to the AWS servers, but I am not sure how to specify what directory to point the non-Wordpress domain to. 我假设我需要将名称服务器指向AWS服务器,但是我不确定如何指定将非Wordpress域指向的目录。

For my Wordpress domains, I was able to use the "Sites" feature in Wordpress to configure multiple Wordpress domains. 对于我的Wordpress域,我能够使用Wordpress中的“站点”功能来配置多个Wordpress域。

Since this new domain isn't going to be a Wordpress site, do I need to modify the httpd-vhosts.conf file or something else? 由于此新域将不再是Wordpress网站,我是否需要修改httpd-vhosts.conf文件或其他内容? What specifically do I need to add? 我需要具体添加什么?

Bitnami Engineer here. Bitnami工程师在这里。 You can copy the WordPress configuration files to a new folder 您可以将WordPress配置文件复制到新文件夹中

sudo mkdir -p /opt/bitnami/apps/myapp/{conf,htdocs}
sudo chown -R bitnami:daemon /opt/bitnami/apps/myapp/htdocs
sudo cp -r /opt/bitnami/apps/wordpress/conf/*.conf /opt/bitnami/apps/myapp/conf/

and then perform the following changes 然后执行以下更改

  • Edit the configuration files inside the /opt/bitnami/apps/myapp/conf/ directory. 编辑/ opt / bitnami / apps / myapp / conf /目录中的配置文件。 The httpd-prefix.conf should configure the Alias directive and you need to remove the DocumentRoot (remember to change the paths to the new ones). httpd-prefix.conf应该配置Alias指令,并且您需要删除DocumentRoot(请记住将路径更改为新路径)。 The httpd-app.conf should configure the Directory where your application is (remember to change the paths to the new ones) httpd-app.conf应该配置应用程序所在的目录(请记住将路径更改为新路径)
  • Include the new httpd-prefix.conf file in the /opt/bitnami/apache2/conf/bitnami/bitnami-apps-prefix.conf file 在/opt/bitnami/apache2/conf/bitnami/bitnami-apps-prefix.conf文件中包括新的httpd-prefix.conf文件
  • Restart Apache 重新启动Apache

     sudo /opt/bitnami/ctlscript.sh restart apache 

You can obtain more information in our documentation guide 您可以在我们的文档指南中获取更多信息

https://docs.bitnami.com/aws/apps/wordpress/administration/create-custom-application-php/ https://docs.bitnami.com/aws/apps/wordpress/administration/create-custom-application-php/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM