Create a custom HTTP-only application
Run the following commands to create the directories:
$ sudo mkdir installdir/apps/myapp $ sudo mkdir installdir/apps/myapp/htdocs/ $ sudo mkdir installdir/apps/myapp/conf
Create and edit the installdir/apps/myapp/conf/httpd-prefix.conf file and add the following lines:
Alias /myapp/ "installdir/apps/myapp/htdocs/" Alias /myapp "installdir/apps/myapp/htdocs/" Include "installdir/apps/myapp/conf/httpd-app.conf"
Create and edit the installdir/apps/myapp/conf/httpd-app.conf file and add the following lines:
IMPORTANT: This is the main configuration file for your application, so modify it further depending on your application’s requirements.
<Directory installdir/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 installdir/apache2/conf/bitnami/bitnami-apps-prefix.conf, as shown below:
Restart the Apache server:
$ sudo installdir/ctlscript.sh restart apache
You should now be able to access the application at http://localhost/myapp.