[英]How to change routing in bitnami?
I have two custom php apps in bitnami.我在 bitnami 中有两个自定义 php 应用程序。 First one in
apps/site
and second in apps/forum
.第一个在
apps/site
和第二个在apps/forum
。 How can I make it so the site loads when you go to domain.com
and forum when you go to forum.domain.com
?我怎样才能使网站在您访问
domain.com
时加载,而在访问forum.domain.com
时加载论坛?
Now to access those two apps I need to go to domain.com/site
and domain.com/forum
.现在要访问这两个应用程序,我需要转到
domain.com/site
和domain.com/forum
。
Bitnami Engineer here, Bitnami工程师在这里,
If you are using the default paths, follow these steps (they use /opt/bitnami
as installdir and pwd
):如果您使用默认路径,请按照以下步骤操作(它们使用
/opt/bitnami
作为 installdir 和pwd
):
site/conf/httpd-vhosts.conf
with the content below:site/conf/httpd-vhosts.conf
:<VirtualHost *:80>
ServerName domain.com
ServerAlias www.domain.com
DocumentRoot "/opt/bitnami/apps/site/htdocs"
Include "/opt/bitnami/apps/site/conf/httpd-app.conf"
</VirtualHost>
<VirtualHost *:443>
ServerName domain.com
ServerAlias www.domain.com
DocumentRoot "/opt/bitnami/apps/site/htdocs"
SSLEngine on
SSLCertificateFile "/opt/bitnami/apache2/conf/server.crt"
SSLCertificateKeyFile "/opt/bitnami/apache2/conf/server.key"
Include "/opt/bitnami/apps/site/conf/httpd-app.conf"
</VirtualHost>
forum/conf/httpd-vhosts.conf
with the content below:forum/conf/httpd-vhosts.conf
,内容如下: <VirtualHost *:80>
ServerName forum.domain.com
ServerAlias www.forum.domain.com
DocumentRoot "/opt/bitnami/apps/forum/htdocs"
Include "/opt/bitnami/apps/forum/conf/httpd-app.conf"
</VirtualHost>
<VirtualHost *:443>
ServerName forum.domain.com
ServerAlias www.forum.domain.com
DocumentRoot "/opt/bitnami/apps/forum/htdocs"
SSLEngine on
SSLCertificateFile "/opt/bitnami/apache2/conf/server.crt"
SSLCertificateKeyFile "/opt/bitnami/apache2/conf/server.key"
Include "/opt/bitnami/apps/forum/conf/httpd-app.conf"
</VirtualHost>
apache2/conf/bitnami/bitnami-apps-prefix.conf
:apache2/conf/bitnami/bitnami-apps-prefix.conf
注释掉这些行:#Include "/opt/bitnami/apps/site/conf/httpd-prefix.conf"
#Include "/opt/bitnami/apps/forum/conf/httpd-prefix.conf"
apache2/conf/bitnami/bitnami-apps-vhosts.conf
:apache2/conf/bitnami/bitnami-apps-vhosts.conf
:Include "/opt/bitnami/apps/site/conf/httpd-vhosts.conf"
Include "/opt/bitnami/apps/forum/conf/httpd-vhosts.conf"
I hope it helps我希望它有帮助
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.