Problem installing on NGINX (Centminmod) - 404 on install and PHP FPM error #956
Replies: 4 comments 1 reply
-
Seems you are running PHP 7?
Please update to php8 we dropped support for 7 a few weeks ago.
…On Wed, Sep 14, 2022 at 8:28 AM João Mourinho ***@***.***> wrote:
Hi Everyone,
i am trying to give Leantime 2.2.7 for the guys in my company to test.
Server environment: CentOS + Centiminmod (NGINX)
I have installed as per the instructions. When i get to the installation
part (adding /install to the URL at the web browser), i get a 404 error.
If i just hit the base url, i get a 500 error. Checking the PHP-FPM error
log i get this:
[14-Sep-2022 13:23:10 Europe/Lisbon] PHP Parse error: syntax error,
unexpected '|', expecting variable (T_VARIABLE) in /home/nginx/domains/
leantime.XXXXXXXX.com/src/domain/auth/services/class.auth.php on line 466
Can you help me to get this running?
—
Reply to this email directly, view it on GitHub
<#956>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALG4EFRBDN66NYNDOCTIVXDV6HAG3ANCNFSM6AAAAAAQMLXOHA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Upgraded to PHP 8.1. I guess something is not working with the rewrites at the nginx conf. This is my file:
Can you spot something wrong? |
Beta Was this translation helpful? Give feedback.
-
Yeahm there was an issue with the nginx file redirect:
Can you change
`location / {
rewrite ^/?$ /index.php?act=dashboard.show;
rewrite ^/([^/\.]+)/([^/\.]+)/?$ /index.php?act=$1;
rewrite ^/([^/\.]+)/([^/\.]+)/?$ /index.php?act=$1.$2;
rewrite ^/([^/\.]+)/([^/\.]+)/([^/\.]+)/?$ /index.php?act=$1.$2&id=$3;
}
`
to
`location / {
rewrite ^/?$ /index.php?act=dashboard.show;
rewrite ^/([^/\.]+)/?$ /index.php?act=$1;
rewrite ^/([^/\.]+)/([^/\.]+)/?$ /index.php?act=$1.$2;
rewrite ^/([^/\.]+)/([^/\.]+)/([^/\.]+)/?$ /index.php?act=$1.$2&id=$3;
}
`
(Second rewrite is wrong)
…On Wed, Sep 14, 2022 at 9:36 AM João Mourinho ***@***.***> wrote:
Upgraded to PHP 8.1.
Some progress. When i hit the base url, it redirects me automatically to
the baseurl/install as supposed. But then i still get the 404.
I guess something is not working with the rewrites at the nginx conf. This
is my file:
------------------------------
server {
listen 80;
server_name leantime.XXXXXXXXX.com;
return 301 https://leantime.XXXXXXXXX.com$request_uri;
}
server {
listen 443 ssl http2;
server_name leantime.XXXXXXXXX.com;
set $base /home/nginx/domains/leantime.XXXXXXXXX.com;
root $base/public;
ssl_certificate /usr/local/nginx/conf/ssl/XXXXXXXXX.crt;
ssl_certificate_key /usr/local/nginx/conf/ssl/XXXXXXXXX.rsa;
# logging
access_log /var/log/nginx/leantime.access.log;
error_log /var/log/nginx/leantime.error.log warn;
# index.php
index index.php;
location ~.php$ {
# 404
try_files $fastcgi_script_name =404;
# default fastcgi_params
include fastcgi_params;
# fastcgi settings
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
# fastcgi params
fastcgi_param DOCUMENT_ROOT $realpath_root;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param PHP_ADMIN_VALUE "open_basedir=$base/:/usr/lib/php/:/tmp/";
}
location / {
rewrite ^/?$ /index.php?act=dashboard.show;
rewrite ^/([^/\.]+)/([^/\.]+)/?$ /index.php?act=$1;
rewrite ^/([^/\.]+)/([^/\.]+)/?$ /index.php?act=$1.$2;
rewrite ^/([^/\.]+)/([^/\.]+)/([^/\.]+)/?$ /index.php?act=$1.$2&id=$3;
}
# additional config
# favicon.ico
location = /favicon.ico {
log_not_found off;
access_log off;
}
# robots.txt
location = /robots.txt {
log_not_found off;
access_log off;
}
# assets, media
location ~* \.(?:css(\.map)?|js(\.map)?|jpe?g|png|gif|ico|cur|heic|webp|tiff?|mp3|m4a|aac|ogg|midi?|wav|mp4|mov|webm|mpe?g|avi|ogv|flv|wmv)$ {
expires max;
access_log off;
}
# svg, fonts
location ~* \.(?:svgz?|ttf|ttc|otf|eot|woff2?)$ {
add_header Access-Control-Allow-Origin "*";
expires max;
access_log off;
}
# gzip
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_types text/plain text/css text/xml application/json application/javascript application/rss+xml application/atom+xml image/svg+xml;
}
------------------------------
Can you spot something wrong?
—
Reply to this email directly, view it on GitHub
<#956 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALG4EFXVC53Y47ZMFRD6CBTV6HIHLANCNFSM6AAAAAAQMLXOHA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Marcel, thank you a lot! It solved and now i can see the install page. I'll proceed with the install. Should anything go wrong, i'll provide feedback. Thank you! |
Beta Was this translation helpful? Give feedback.
-
Hi Everyone,
i am trying to give Leantime 2.2.7 for the guys in my company to test. Server environment: CentOS + Centiminmod (NGINX)
I have installed as per the instructions. When i get to the installation part (adding /install to the URL at the web browser), i get a 404 error.
If i just hit the base url, i get a 500 error. Checking the PHP-FPM error log i get this:
[14-Sep-2022 13:23:10 Europe/Lisbon] PHP Parse error: syntax error, unexpected '|', expecting variable (T_VARIABLE) in /home/nginx/domains/leantime.XXXXXXXX.com/src/domain/auth/services/class.auth.php on line 466
Can you help me to get this running?
Btw, as another feedback: i find it odd that not every distributed folder goes inside the server public folder.
Beta Was this translation helpful? Give feedback.
All reactions