Create a custom HTTP-only application
Run the following commands to create the directories:
$ sudo mkdir /opt/bitnami/apps/myapp $ sudo mkdir /opt/bitnami/apps/myapp/htdocs/ $ sudo mkdir /opt/bitnami/apps/myapp/conf
Create and edit the /opt/bitnami/apps/myapp/conf/httpd-prefix.conf file and add the lines below to it:
Alias /myapp/ "/opt/bitnami/apps/myapp/htdocs/" Alias /myapp "/opt/bitnami/apps/myapp/htdocs/" Include "/opt/bitnami/apps/myapp/conf/httpd-app.conf"
Create and edit the /opt/bitnami/apps/myapp/conf/httpd-app.conf file and add the lines below to it. This is the main configuration file for your application, so modify it further depending on your application’s requirements.
<Directory /opt/bitnami/apps/myapp/htdocs/> Options +FollowSymLinks AllowOverride None Require all granted </Directory>
NOTE: Bitnami uses the htaccess.conf file for security and performance purposes. This is the approach we recommend for custom applications too. However, if your application uses .htaccess files instead, you should change the AllowOverride None option to AllowOverride All and add an Include directive to include your custom .htaccess file after the above configuration block.
Once you have created the files and directories above, add the following line to the end of the main Apache configuration file at /opt/bitnami/apache2/conf/bitnami/bitnami-apps-prefix.conf, as shown below:
Restart the Apache server:
$ sudo /opt/bitnami/ctlscript.sh restart apache
You should now be able to access the application at http://SERVER-IP/myapp.