[aur-dev] [PATCH] Improve INSTALL details for nginx and config.

Marcel Korpel marcel.korpel at gmail.com
Wed Jun 17 11:07:50 UTC 2015


* Lukas Fleischer <lfleischer at archlinux.org> (Wed, 17 Jun 2015 10:26:38
+0200):
> This example configuration makes it hard to add other server blocks.
> I'd rather keep the introductory text and replace the location block
> with a server block that might look as follows:
> 
>     server {
>         listen       80;
>         server_name  aur.local aur;
> 
>         root         /srv/http/aurweb/web/html;
>         index        index.php;

Ah! I thought you said that these lines should be outside of the server
block, but this is much better!

> 
>         location ~ ^/[^/]+\.php($|/) {
>             fastcgi_pass   unix:/var/run/php-fpm/php-fpm.sock;
>             fastcgi_index  index.php;
>             fastcgi_split_path_info ^(/[^/]+\.php)(/.*)$;
>             fastcgi_param  SCRIPT_FILENAME
> $document_root$fastcgi_script_name; fastcgi_param  PATH_INFO
> $fastcgi_path_info; include        fastcgi_params;

[How do I tell my email client to not wrap lines in case of patches?
(In normal cases, it definitely should!)]

>         }
> 
>         location ~ .* {
>             rewrite ^/(.*)$ /index.php/$1 last;
>         }
>     }
> 
> What do you think?

Looks neater to me, less clutter. But shouldn't we at least add a line
like

        error_log  /var/log/nginx/aurweb.error.log notice;

without it, I didn't get an error log at all and it's hard to debug
things without one.


More information about the aur-dev mailing list