Setup ULRS do not have ? causes set up fail

I am attempting to install invoice plane in php-fpm container proxied by an nginx container. I am running PHP 7.4.23
my php -m output is as follows:

root@e1bb2c02a900:/var/www/html# php -m
[PHP Modules]
Core
ctype
curl
date
dom
fileinfo
filter
ftp
gd
hash
iconv
json
libxml
mbstring
mcrypt
mysqli
mysqlnd
openssl
pcre
PDO
pdo_sqlite
Phar
posix
readline
recode
Reflection
session
SimpleXML
sodium
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlrpc
xmlwriter
zlib

[Zend Modules]


When I attempt to run the setup, I go to Domain.com and I receive a 404 error. If I modify the URL to be Domain.com then I get the page to begin the setup. After each step, when I click the next button, the ? is removed and a 404 is given. I can get to the language section by manually adding the ? back in, but I can’t get past that.

I am hoping there is a rewrite or something simple I have messed up that can fix this.

htaccess file:

## Run InvoicePlane in a subfolder
## If you are using a subfolder please remove the hash in front of the line ‘#RewriteBase /subfolder’
## and replace ‘subfolder’ with the actual name of your folder, i.e. ‘RewriteBase /invoices’

<IfModule mod_rewrite.c>

  RewriteEngine On
  #RewriteBase /subfolder
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.php [L]

  ## Remove the hash in front of the following two lines if you want to force HTTPS
  #RewriteCond %{HTTPS} off
  #RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]

</IfModule>
~

nginx config file

upstream phpfcgi {
    server php:9000;
}

server {
  listen 80;
  server_name localhost;
  root /var/www/html;

  index index.php;

  location / {
    try_files $uri $uri/;
  }

  location ~ [^/]\.php(/|$) {
    try_files $uri =404;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass phpfcgi;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
  }
}

Please let me know what other information I can provide to help figure out why this ? is not showing up or why it is needed.

Thank you.

It appears my problem was due to using nginx instead of apache, and so the mod_rewrite and htaccess files are irrelevant.

To resolve the issue, I modified the ipconfig.php and set

REMOVE_INDEXPHP=true

Then I modified my nginx configuration file on the try_files line to be this:

 index index.php;

  location / {
    try_files $uri $uri/ /index.php?$args;
  }

Now my site shows up httP://domain.com/setup/ and it works great

Thank you.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.