nginx config

158 views
Skip to first unread message

jensm...@gmail.com

unread,
Jul 27, 2017, 5:46:48 PM7/27/17
to AgenDAV general

Hi,

 

I got the following problem:

 

I use for instance the URL http://cal.xxx.ddnss.org/. Behind the dyndns is running an nginx on a raspberry pi. If I use this URL it will change to htp://cal.xxx.ddnss.org/login and shows the error "404 Not Found" If I use http://cal.xxx.ddnss.org/index.php I can reach the actual login page and everything is working.

 

My nginx config looks like that:

server {

  listen 80;

 

  server_name cal.*;

  root /var/www/agendav/web/public;

  index index.php index.html;

 

  charset utf-8;

 

  location ~ /(\.ht|Core|Specific) {

    deny all;

    return 404;

  }

 

  location ~ ^(.+\.php)(.*)$ {

    try_files $fastcgi_script_name =404;

    fastcgi_split_path_info  ^(.+\.php)(.*)$;

    fastcgi_pass   unix:/var/run/php5-fpm.sock;

    fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;

    fastcgi_param  PATH_INFO        $fastcgi_path_info;

    include        /etc/nginx/fastcgi_params;

  }

}

 

in the log file of agendav the following is shown:

[2017-07-27 23:04:24] agendav.INFO: Matched route "calendar". {"route_parameters":{"_controller":"[object] (Closure: {})","_route":"calendar"},"request_uri":"http://cal.xxx.ddnss.org/"} []

[2017-07-27 23:04:24] agendav.DEBUG: Starting CSRF check [] []

[2017-07-27 23:04:24] agendav.DEBUG: > GET / [] []

[2017-07-27 23:04:24] agendav.DEBUG: < 302 /login [] []

 

Maybe someone knows what to set to get to the login page without always using the URL + index.php.

Thanx

Jens

Jorge López Pérez

unread,
Aug 3, 2017, 6:30:32 AM8/3/17
to agendav...@googlegroups.com
Hi Jens,

On Thu, Jul 27, 2017, at 23:46, jensm...@gmail.com wrote:

> I use for instance the URL http://cal.xxx.ddnss.org/. Behind the dyndns
> is
> running an nginx on a raspberry pi. If I use this URL it will change to
> htp://cal.xxx.ddnss.org/login and shows the error "404 Not Found" If I
> use
> http://cal.xxx.ddnss.org/index.php I can reach the actual login page and
> everything is working.

I think you might want to have a look at
https://silex.symfony.com/doc/2.0/web_servers.html#nginx (linked from
http://docs.agendav.org/en/2.2.0/admin/installation/#web-server-configuration).
Looks like your nginx configuration is missing the required part that
routes every request through the front controller.

Best regards.

--
Jorge López Pérez
http://adobo.org

jensm...@gmail.com

unread,
Aug 16, 2017, 3:22:33 PM8/16/17
to AgenDAV general
Hi,

thanx Jorge! There was a part missing, now its working.

Best Regards
Jens
Reply all
Reply to author
Forward
0 new messages