Open MichaelJumble opened 7 months ago
First of all:
The nginx config file is missing this entry to rewrite /pages/xxx into pages/index.php/xxx
location /pages/ {
try_files $uri $uri/ /pages/index.php?$query_string;
}
at the top of the nginx_conf/osticket.conf file.
But this did not only solve the problem here.
I found out the Path is not parsed by php. Its empty. Looks like that the apache server set env value "PATH_INFO" and this will not work in nginx.
Dumping the value $_server will post
["PATH_INFO"]=> string(0) ""
Add here a static function in /include/class.osticket.php
static function get_pages_path_info() {
$urlArr=parse_url($_SERVER['REQUEST_URI']);
$output = explode('/',$urlArr["path"]);
return $output[2];
}
and switch in /pages/index.php
from
$slug = Format::slugify(Osticket::get_path_info());
to
$slug = Format::slugify(Osticket::get_pages_path_info());
I'm sure there will be a better solution for this. Later I found this:
But this did not work here.
Hello,
just start up the container and it works all out of the box. Also need a static page with privacy notes. So I created a new page with Admin Panel >> Manage >> Pages >> Add new Page
Set Name:test, Type: other status:active
After ADD PAGE, i see "Successfully added test"
When I perform the Link
https://[servername]/pages/test
I catch 404 from ngnix.
But I would expect:
Im not sure but it looks like an nginx or php rewrite setting.
My settings: using latetest Image here
Thanks for any hints.