bitnami LAMP – why is mod_rewrite not working

Yes it is enabled by default but make sure your framework or app httpd-app.conf has AllowOverride set to All.

<directory "..."> 
 AllowOverride All 

For Codeigniter, make sure your .htaccess is in the same dir as your root index.php.

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

git clone on remote server (bitnami)

1. Find the .ssh directory
-make sure always use absolute

$ cd /home/bitnami/.ssh


2. Generate public and private keys on the server



3. Copy the public key to your repo settings (bitbucket/github)

$ cat


4. Try and clone the repo into the server!

$ git clone

self assigned SSL

How to create a ssl certificate on apache for ubuntu.

sudo openssl req -x509 -nodes -days 999 -newkey rsa:2048 -keyout server.key -out server.crt


<VirtualHost *:80>
  DocumentRoot "/opt/bitnami/apps/{myapp}/htdocs/"
  Include "/opt/bitnami/frameworks/photo/conf/httpd-app.conf"

<VirtualHost *:443>
  DocumentRoot "/opt/bitnami/apps/{myapp}/htdocs/"

  SSLEngine on
  SSLCertificateFile "/opt/bitnami/frameworks/codeigniter/conf/certs/server.crt"
  SSLCertificateKeyFile "/opt/bitnami/frameworks/codeigniter/conf/certs/server.key"
  Include "/opt/bitnami/frameworks/codeigniter/conf/httpd-app.conf"

new relic – php agent

Why isn’t the PHP agent for monitoring my Apps working?

We need to manually start it!


1. Install the agent.

apt-get install newrelic-php5


2. Start newrelic PHP daemon.

If you get this error, then go to step 3.

INFO: newrelic.cfg not found - daemon must be launched by the agent.


3. newrelic daemon failed to start because it could not find $ /etc/newrelic/newrelic.cfg. Make a copy of newrelic.cfg.template and rename it.


4. try start newrelic-daemon again:

/etc/init.d/newrelic-daemon start


5. Restart your web server or FastCGI Process Manager (FPM) as you normally would.



ctrl + w

deleting mail in terminal

Get rid of the “You have new mail” in terminal!

$ mail
$ delete 1-30
$ q

Make sure do to the q after the delete 1-* command, that saves the changes to disk.

converting .VMDK to .VHD

Download the LAMP VM image from bitnami. This will be a zip file with vmdk(s).

Extract and convert .vmdk to .vhd for azure upload.

azure mysql

restart mysql

sudo /opt/bitnami/ start
sudo /opt/bitnami/ start mysql
sudo /opt/bitnami/ restart mysql

list sql connections?

ps aux | grep mysql


sudo /opt/bitnami/ status

command prompt

Show active connections

netstat -ao