Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

already installed or misconfiguration #106

Open
bnkcrypt opened this issue May 17, 2019 · 6 comments
Open

already installed or misconfiguration #106

bnkcrypt opened this issue May 17, 2019 · 6 comments
Labels

Comments

@bnkcrypt
Copy link

bnkcrypt commented May 17, 2019

I installed a new machines with nginx , php7.2 has fresh mysql with empty new database name "pdns" when i open the setup link it show me setup form and after filling it I get the follwing error

The application has already been setup or the backend is misconfigured.

Its a fresh machine nothing configured before, php works fine so does mysql . mysql is localhost and has the required clean new empty db .

How do i resolve the issue ?

By the work just to trouble shoot I tried to enter wrong db password to the setup work it show me exact same error seems like its not even trying to connect to db . Are there any libraries for php required if that could be the case .

@Elvon
Copy link

Elvon commented May 21, 2019

I have exactly the same issue.
The only difference is, I'm using Apache.

@vhostvn
Copy link

vhostvn commented Jun 4, 2019

same issue here

image

Repository owner deleted a comment from mf-bluepepper Nov 4, 2019
@loewexy
Copy link
Owner

loewexy commented Dec 25, 2019

In the current master branch I clarified the error message. This comes most likely from a misconfiguration of the backend server. It is issued if the call to the api returns with a 404 error. Please provide the configuration you used for your apache vhost.

@atwebm
Copy link

atwebm commented Jan 18, 2020

I have the same Problem.
This looks like the second Rewrite to the index.php did not occur.

<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName pdns.example.com
ServerAlias pdns2.example.com
ServerAdmin [email protected]
DocumentRoot /srv/www/pdns/frontend
LogLevel info rewrite:trace3
ErrorLog ${APACHE_LOG_DIR}/443pdns2.example.com_error.log
CustomLog ${APACHE_LOG_DIR}/443pdns2.example.com_access.log combined
SSLEngine on
SSLCertificateFile      /etc/ssl/certs/pdns2.example.com.pem
SSLCertificateKeyFile /etc/ssl/private/pdns2.example.com.key

RewriteEngine on
RewriteRule ^index\.html$ - [L]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
RewriteRule !^/api/\.* /index.html [L]

Alias /api /srv/www/pdns/backend/public
<Directory /srv/www/pdns/backend/public>
        RewriteEngine On
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^ index.php [QSA,L]
</Directory>

<IfModule mod_fastcgi.c>
    AddType application/x-httpd-fastphp7 .php
    Action application/x-httpd-fastphp7 /php7-fcgi-pdns2 virtual
    Alias /php7-fcgi-pdns2 /usr/lib/cgi-bin/php-pdns2
    FastCgiExternalServer /usr/lib/cgi-bin/php-pdns2 -socket /run/php/php-pdns2-fpm.sock -pass-header Authorization
    <Directory /usr/lib/cgi-bin>
        Require all granted
    </Directory>
</IfModule>

<IfModule mod_fcgid.c>
    <FilesMatch \.php$>
        SetHandler "proxy:unix:/run/php/php-pdns2-fpm.sock|fcgi://localhost"
    </FilesMatch>
</IfModule>

<Directory "/srv/www/pdns">
    AllowOverride All
    Require all granted
</Directory>

</VirtualHost>
</IfModule>
==> 443pdns2.example.com_error.log <==
[Sat Jan 18 11:23:55.890108 2020] [rewrite:trace2] [pid 27753:tid 140459045250816] mod_rewrite.c(477): [client 88.99.68.40:41232] 88.99.68.40 - - [pdns2.example.com/sid#7fbf44f7ebb8][rid#7fbf343d10a0/initial] init rewrite engine with requested uri /api/v1/setup, referer: https://pdns2.example.com/setup
[Sat Jan 18 11:23:55.890202 2020] [rewrite:trace3] [pid 27753:tid 140459045250816] mod_rewrite.c(477): [client 88.99.68.40:41232] 88.99.68.40 - - [pdns2.example.com/sid#7fbf44f7ebb8][rid#7fbf343d10a0/initial] applying pattern '^index\\.html$' to uri '/api/v1/setup', referer: https://pdns2.example.com/setup
[Sat Jan 18 11:23:55.890223 2020] [rewrite:trace3] [pid 27753:tid 140459045250816] mod_rewrite.c(477): [client 88.99.68.40:41232] 88.99.68.40 - - [pdns2.example.com/sid#7fbf44f7ebb8][rid#7fbf343d10a0/initial] applying pattern '^/api/\\.*' to uri '/api/v1/setup', referer: https://pdns2.example.com/setup
[Sat Jan 18 11:23:55.890241 2020] [rewrite:trace1] [pid 27753:tid 140459045250816] mod_rewrite.c(477): [client 88.99.68.40:41232] 88.99.68.40 - - [pdns2.example.com/sid#7fbf44f7ebb8][rid#7fbf343d10a0/initial] pass through /api/v1/setup, referer: https://pdns2.example.com/setup
[Sat Jan 18 11:23:55.890611 2020] [core:info] [pid 27753:tid 140459045250816] [client 88.99.68.40:41232] AH00128: File does not exist: /srv/www/pdns/backend/public/v1/setup, referer: https://pdns2.example.com/setup

==> 443pdns2.example.com_access.log <==
88.99.68.40 - - [18/Jan/2020:11:23:55 +0100] "POST /api/v1/setup HTTP/1.1" 404 645 "https://pdns2.example.com/setup" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36"

@satishdotpatel
Copy link

I am getting this error on centOS8 fresh installation, Document is very poor so hard to resolve it. any suggestion?

@loewexy
Copy link
Owner

loewexy commented Oct 22, 2020

I can not support other setups, but the problem should always be that the backend is not configured correctly. Since it uses the Slim PHP Framework, maybe you can find hints on using Slim with apache and centOS8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants