40 lines
1.4 KiB
Plaintext
40 lines
1.4 KiB
Plaintext
# https://www.kimai.org/documentation/webserver-configuration.html
|
|
server {
|
|
listen 80;
|
|
root /opt/kimai/public;
|
|
index index.php;
|
|
|
|
access_log off;
|
|
log_not_found off;
|
|
|
|
location ~ /\.ht {
|
|
deny all;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri /index.php$is_args$args;
|
|
}
|
|
|
|
location ~ ^/index\.php(/|$) {
|
|
fastcgi_pass 127.0.0.1:9000;
|
|
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
|
include fastcgi_params;
|
|
# You can use the document root directly:
|
|
# fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
|
|
# But this is not working in every situation. When you are using symlinks to link the document
|
|
# root to the current version of your application, you should pass the real
|
|
# application path instead of the path to the symlink to PHP FPM.
|
|
# Otherwise, PHP's OPcache may not properly detect changes to your PHP files
|
|
# (see https://github.com/zendtech/ZendOptimizerPlus/issues/126 for more information).
|
|
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
|
fastcgi_param DOCUMENT_ROOT $realpath_root;
|
|
# Activate this if you run Kimai alone or inside a VirtualHost, otherwise this example might break other PHP apps
|
|
# fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/..:/tmp/";
|
|
internal;
|
|
}
|
|
|
|
location ~ \.php$ {
|
|
return 404;
|
|
}
|
|
} |