0

Background:

I want to setup Bugify on my Ubuntu Server running nginx. I followed the instructions, installed the dependencies and the installation was successful. Once I enter my licence key and click on "Install Bugify" it's redirecting to http://dev.mysite.com/login?new and the only thing I'm seeing is 404 Not Found.

I know that nginx isn't officially supported but according to the support forum it should be possible to run it.

Question:

There's a .htaccess file with rewrite rules in the webapp's public directory and I guess the problem causing the 404 error is that nginx isn't able to work with the .htaccess file, so I'll have to convert the rewrite rules to the nginx syntax.

I'm not really familiar with apache's rewrite rules so I'd need some help figuring this out.

The content of the .htaccess file is:

# Rewriting
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

I was using this tool to convert the rules but it's having some troubles with the - flags.

#ignored: "-" thing used or unknown variable in regex/rew

Thanks in advance!

1
  • The dashes the converter is "ignoring" are the ones that mean don't rewrite the matching request.
    – quentinxs
    Commented Jan 5, 2013 at 6:55

1 Answer 1

1

Bugify uses the Zend Framework, so the rewrite rules for ZF should work for Bugify also. I have copied the suggested nginx config below from http://wiki.nginx.org/Zend_Framework

server {
  listen 80;
  server_name www.example.com;
  root /var/www/www.example.com/myapplication;
  index  index.html index.htm index.php;

  location / {
    # This is cool because no php is touched for static content
    try_files $uri $uri/ /index.php;
  }

  location ~ \.php$ {
    fastcgi_pass      unix:/usr/local/zend/tmp/php-fastcgi.socket;
    fastcgi_index    index.php;
    fastcgi_param   SCRIPT_FILENAME /var/www/www.example.com/myapplication$fastcgi_script_name;
    include               fastcgi_params;
  }
}
1
  • I was using the exact same nginx config except without the try_files $uri $uri/ /index.php; part. I added it and everything's working now. Thanks for the support even if nginx isn't officially supported. I guess you could add it to the supported webserver list if you add this snippet to the bugify knowledge base!
    – mediocre
    Commented Jan 6, 2013 at 18:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.