Tuesday, May 29, 2018

Re: [update] davical & awl [was: www/awl needs update to work with PHP 7, breaks productivity/davical]

On 18-05-29 08:07:00, Landry Breuil wrote:
> On Mon, May 28, 2018 at 10:38:55PM +0200, viq wrote:
> > On 18-05-28 12:54:43, Stuart Henderson wrote:
> >
> > It wanted to update schema, took me a moment to figure out that I need
> > to run again
> > psql -U davical_dba -f /var/www/davical/dba/davical.sql davical
> > before running the /var/www/davical/dba/update-davical-database script.
>
> Same here, i manually applied some of the
> /var/www/davical/dba/patches/*.sql
>
> > One rather unrelated but puzzling issue is that I keep getting 404 for
> > all web resources (css, js) with following httpd config:
> > server "cal.example.com" {
> > listen on $ext_addr port 80
> > block return 301 "https://cal.example.com$REQUEST_URI"
> > location "/.well-known/acme-challenge/*" {
> > root "/acme"
> > root strip 2
> > pass
> > }
> > }
> >
> > server "cal.example.com" {
> > listen on $ext_addr tls port 443
> >
> > tls certificate "/etc/ssl/cal.example.com.fullchain.pem"
> > tls key "/etc/ssl/private/cal.example.com.key"
> > hsts
> >
> > log { access "davical-access.log", error "davical-error.log" }
> >
> > connection { max requests 500, timeout 3600 }
> > location "/" { directory index index.php }
> > location "/*.php*" {
> > fastcgi socket "/run/php-fpm.sock"
> > root "/davical/htdocs"
> > }
> > }
>
> no such problem with the following nginx conf:
>
> root /var/www/davical/htdocs/;
>
> location / {
> index index.php;
> }
>
> location /images/ {
> }
> location ~ ^(.*\.php)(.*)$ {
> include fastcgi_params;
> fastcgi_pass unix:run/php-fpm.sock;
> fastcgi_split_path_info ^(.*\.php)(.*)$;
> fastcgi_param PATH_INFO $fastcgi_path_info;
> fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
> }

FWIW, this seems to work now:
location "/" {
directory index index.php
root "/davical/htdocs"
}
location "/*.php*" {
fastcgi socket "/run/php-fpm.sock"
root "/davical/htdocs"
}
location "/*.css" {
directory index index.php
root "/davical/htdocs"
}
location "/*.js" {
directory index index.php
root "/davical/htdocs"
}
location "/*.gif" {
directory index index.php
root "/davical/htdocs"
}

dirty, but seems to do the trick. Which after cleaning up may be worth
mentioning in the README?

No comments:

Post a Comment