Synchronize Firefox on your Weave Minimal server through Nginx
Par theYinYeti le jeudi 31 octobre 2013, 12:36 - Lien permanent
A long time ago, I installed Weave Minimal on my Apache server, so that I could synchronize Firefox without having to rely on a third-party server.
This Weave server is now officially deprecated, but I still use it because it works, and it is really light-weight! Someone recognized this and is now proposing a new weave-minimal server; I did not try it, but if you have nothing installed yet, it may be a better choice.
In this blog post, I explain how to configure the Nginx web server for the old Weave Minimal.
Let’s assume that Weave Minimal is installed in the /var/www/weave
directory. Configuration for Apache amounted to a simple alias:
Alias /weave /var/www/weave/index.php
It is not that simple with Nginx. If you use my method of configuring PHP, then it is only slightly more complex:
location /weave {
alias /var/www/weave/index.php;
rewrite ^(/weave)(/.*)?$ /...$document_root/...$1/.../...$2 last;
}
However, if you prefer to keep things more traditional and configure PHP for each location, you have to write the configuration like this:
location ~ ^/weave(?<pathinfo>.*)?$ {
fastcgi_pass unix:/var/run/php5-fpm.sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /var/www/weave/index.php;
fastcgi_param SCRIPT_NAME /weave;
fastcgi_param DOCUMENT_ROOT /var/www/weave;
fastcgi_param PATH_INFO $pathinfo if_not_empty;
}