1) An easy approach to have your application in the root URL is to uncomment the following lines in your application configuration file /installdir/apps/your_application/conf/httpd-app.conf (previous version is your_application.conf). This approach only changes the initial page of your application, not the internal urls, all the links point to "http://example.com/your_application". If you do not see these lines you can add them at the end of the file. Note that "your_application" could be wordpress, joomla, drupal, etc.
RewriteEngine On
RewriteRule ^/$ /your_application/ [PT]
Using this configuration and restarting the Apache server you can see your initial page of your application in the root URL.
2) Another option is to configure your application to run in the root URL directly. The details are described below (if you have already configured the application using the first method, note that you have to revert the change before continuing with this approach).
If you want to change the default URL from http://your_domain/your_application to http://your_domain, you should add a "DocumentRoot" entry in your application conf file. Edit the /opt/bitnami/apps/your_application/conf/httpd-prefix.conf file (your_application.conf in previous versions) to add this line and commenting the "Alias" entries. You can use the "nano" editor:
$ sudo nano /opt/bitnami/apps/your_application/conf/httpd-prefix.conf
httpd-prefix.conf file content:
DocumentRoot "/opt/bitnami/apps/your_application/htdocs" # Alias /your_application/ "/installdir/apps/your_application/htdocs/" # Alias /your_application "/installdir/apps/your_application/htdocs" (...)
Some applications also require changes in their configuration files or in the database.
本文介绍了两种方法直接通过根URL访问Bitnami虚拟机上的应用程序。第一种是在应用配置文件中修改规则,使得初始页面位于根路径下。第二种是直接配置应用在根URL运行,涉及修改DocumentRoot并调整相关配置文件和可能的数据库设置。
2319

被折叠的 条评论
为什么被折叠?



