How do I setup Bugify on my server?

Below is an example of the Bugify file structure (only some of the files are represented below).

/var/www/bugify.example.com/
        |--application/
        |--cli/
        |--library/
        +--public/    <-- Apache/Nginx points here
              |--.htaccess
              |--index.php
              +--css/
              +--images/
              +--js/
              +--etc...

Note that the virtual host should point to the public folder. The other folders should be outside the web root - so they are not accessible via a web browser.

Please note that you don't need to use bugify.example.com - we're just using that as an example hostname.

If you're using a hosting control panel like cPanel or Plesk, you might not be able to use public as the folder name. In this case, you can do one of the following:

  • Symlink from public_html (or httpdocs or whatever your doc root folder is called) to public.
  • Rename public to public_html (again or whatever your doc root folder is called).
  • Copy the contents of public to your doc root folder.

Database

Bugify supports both MySQL and SQLite (they will only show up if you have them installed on your server). If you choose SQLite, Bugify will automatically create the database file at ./application/database/bugify.db.
If you choose MySQL, you will need to know your MySQL details (provided by your web host). Please remember to create the MySQL database first, so when you're installing Bugify, you should already know your MySQL database hostname, database name, username and password. Bugify will automatically create the tables in your MySQL database, but it will not create a database for you.

Permissions

Bugify needs "write" access to its files. It needs this so it can automatically create some required folders, write its own log files, store uploaded files etc. It also needs write access so the auto-update system has access to copy the new files in.

The best way to give Bugify "write" access to its files/folders, is to ensure all the files/folders are "owned" by the web server user (this is different on different servers/setups). Generally if you upload the files via FTP, it will probably have the correct ownership (but not always the case), and if you use SSH and wget to copy the install file to your server (using unzip to extract), you may or may not need to fix the permissions. It all depends on your setup, but the basic idea is to ensure that Bugify has "write" access to all its files/folders.

Apache

Setup an Apache virtual host (below is an example), then, in your browser, load up the new virtual host and follow the installation instructions.

If you get a 404 error (page not found) when loading up Bugify, it's possible that your virtual host config is set to AllowOverride None - this prevents the .htaccess file from doing its job. Please change the AllowOverride setting to something more suitable (usually AllowOverride All is ok).

<VirtualHost *:80>
    ServerName bugify.example.com
    DocumentRoot /var/www/bugify.example.com/public
</VirtualHost>

Nginx

Use the following example config file to setup Bugify on Nginx.

server {
    listen 89;
    server_name bugify.example.com;
    root /var/www/bugify.example.com/public;
    index index.php;

    location / {
      # Send all requests for non-static content to index.php
      try_files $uri $uri/ /index.php?$query_string;

      fastcgi_param QUERY_STRING $query_string;
    }

    location ~ \.php$ {
      fastcgi_pass   unix:/var/run/php-fastcgi/php-fastcgi.socket;
      fastcgi_index  index.php;
      fastcgi_param  SCRIPT_FILENAME /var/www/bugify.example.com/public$fastcgi_script_name;
      include        fastcgi_params;
    }
}

Please note that some people have found the following works better for them:

location / { 
    # Send all requests for non-static content to index.php 
    if (!-e $request_filename) { 
        rewrite ^/(.*)$ /index.php?q=$1 last; 
        break; 
    }

    fastcgi_param QUERY_STRING $query_string; 
}

Permissions/Ownership on Mac OS X

After unzipping the Bugify files on a Mac, you generally need to change the file permissions and ownership using the following commands. Note that in the commands below bugify refers to the folder created when unzipping - so beneath that folder would be the application, library etc folders.

chown -R _www bugify
chmod -R 755 bugify

Still not working?

Please review this article: Common causes of errors (500/404 errors).