Giter VIP home page Giter VIP logo

Comments (24)

loewexy avatar loewexy commented on July 17, 2024

Did you follow exactly the instructions on the website. What happens after you hit Setup in the Setup-Wizzard. Helpful would be the Apache access and error log.

from pdnsmanager.

abtme avatar abtme commented on July 17, 2024

Hi

Thanks for getting back to me.

I setup mysql with a database and password - so its ready to go.
Apache setup as per your documentation with php-json and pecl install for acpu

root@ubuntu18-test:/var/www/powerdns/backend/config# php -m | grep json
json
root@ubuntu18-test:/var/www/powerdns/backend/config# php -m | grep apcu
apcu
root@ubuntu18-test:/var/www/powerdns/backend/config#

fqdn\setup - I fill in the details and it then returns to the login prompt.

no apache errors in the log

but no tables are created during the setup phase.
also I am able to login with any credentials.

Andrew

from pdnsmanager.

abtme avatar abtme commented on July 17, 2024

here are the logs from apache
apache.log

from pdnsmanager.

loewexy avatar loewexy commented on July 17, 2024

I guess there is some configuration error in your apache config. Since the call to /api/v1/setup returns HTTP Code 200 which is not a code that is returned by the API for that endpoint. So my guess is that pdnsmanager is not called but instead some arbitrary response from the server is received.

What do you get if you visit https://example.com/api/v1/remote/servertime?

from pdnsmanager.

abtme avatar abtme commented on July 17, 2024
10.68.31.73 - - [04/Jan/2021:10:49:12 +0000] "GET /app/v1/remote/servertime? HTTP/1.1" 200 689 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"

this is the apache config used.

root@ubuntu18-test:/var/www/powerdns/backend/config# cat /etc/apache2/sites-enabled/pdns.conf
<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ServerName testpdns.gosport.local

    DocumentRoot /var/www/powerdns/frontend

    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 /var/www/powerdns/backend/public
    <Directory /var/www/powerdns/backend/public>
        RewriteEngine On
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^ index.php [QSA,L]
    </Directory>
  CustomLog /var/log/apache2/testpdns.gosport.local-access.log combined
  ErrorLog /var/log/apache2/testpdns.gosport.local-error.log
</VirtualHost>

from pdnsmanager.

loewexy avatar loewexy commented on July 17, 2024
10.68.31.73 - - [04/Jan/2021:10:49:12 +0000] "GET /app/v1/remote/servertime? HTTP/1.1" 200 689 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"

I am interested what you see in your browser, not in the log this time.

Your config looks sane, is there something in your error log?

from pdnsmanager.

abtme avatar abtme commented on July 17, 2024

Before I press enter

before

After I pressed enter.

after

error log is empty.

from pdnsmanager.

loewexy avatar loewexy commented on July 17, 2024

That seems to be that the rewrite does not work. Do you have mod_rewrite enabled in apache?

from pdnsmanager.

abtme avatar abtme commented on July 17, 2024

Yes - apache would not start until it was enabled.

root@ubuntu18-test:/var/www/powerdns/backend/config# apachectl -M
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Loaded Modules:
 core_module (static)
 so_module (static)
 watchdog_module (static)
 http_module (static)
 log_config_module (static)
 logio_module (static)
 version_module (static)
 unixd_module (static)
 access_compat_module (shared)
 alias_module (shared)
 auth_basic_module (shared)
 authn_core_module (shared)
 authn_file_module (shared)
 authz_core_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 deflate_module (shared)
 dir_module (shared)
 env_module (shared)
 filter_module (shared)
 mime_module (shared)
 mpm_event_module (shared)
 negotiation_module (shared)
 reqtimeout_module (shared)
 rewrite_module (shared)
 setenvif_module (shared)
 status_module (shared)
root@ubuntu18-test:/var/www/powerdns/backend/config# apachectl -M | grep rewr
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
 rewrite_module (shared)
root@ubuntu18-test:/var/www/powerdns/backend/config#

from pdnsmanager.

loewexy avatar loewexy commented on July 17, 2024

Then I really have no clue on what is going wrong for you. But the call to https://example.com/api/v1/remote/servertime should return you a JSON document with a Unix timestamp. It seems that either the Alias or rewriting does not work for you... But I do not know why. For me a fresh installation on Ubuntu 18.04 with the website tutorial does work without problems.

from pdnsmanager.

abtme avatar abtme commented on July 17, 2024

Ok - will try and debug the rewrite - thank you for the help - at least I now know im not going mad. !!

from pdnsmanager.

abtme avatar abtme commented on July 17, 2024

Also

  • can you tell me - before I install pdnsmanager do you expect there to be a working pdns mysql installation ?

from pdnsmanager.

abtme avatar abtme commented on July 17, 2024

I did a curl

root@debian-dev01:~# curl http://testpdns.gosport.local/app/v1/remote/servertime
<!doctype html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <title>PDNS Manager</title>
  <base href="/">

  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="stylesheet" href="styles.38d51718cb6869288f32.css"></head>

<body>
  <app-root></app-root>
<script type="text/javascript" src="runtime.a66f828dca56eeb90e02.js"></script><script type="text/javascript" src="polyfills.001f1812942338ddb405.js"></script><script type="text/javascript" src="main.461bd5e9e32973318e39.js"></script></body>

and got this response from the webserver.

==> /var/log/apache2/testpdns.gosport.local-error.log <==
[Mon Jan 04 11:32:32.856779 2021] [rewrite:trace2] [pid 2990:tid 140129163253504] mod_rewrite.c(482): [client 172.31.99.11:33626] 172.31.99.11 - - [testpdns.gosport.local/sid#7f727a1f6880][rid#7f727a13a0a0/initial] init rewrite engine with requested uri /app/v1/remote/servertime
[Mon Jan 04 11:32:32.856852 2021] [rewrite:trace3] [pid 2990:tid 140129163253504] mod_rewrite.c(482): [client 172.31.99.11:33626] 172.31.99.11 - - [testpdns.gosport.local/sid#7f727a1f6880][rid#7f727a13a0a0/initial] applying pattern '^index\\.html$' to uri '/app/v1/remote/servertime'
[Mon Jan 04 11:32:32.856871 2021] [rewrite:trace3] [pid 2990:tid 140129163253504] mod_rewrite.c(482): [client 172.31.99.11:33626] 172.31.99.11 - - [testpdns.gosport.local/sid#7f727a1f6880][rid#7f727a13a0a0/initial] applying pattern '^/api/\\.*' to uri '/app/v1/remote/servertime'
[Mon Jan 04 11:32:32.856900 2021] [rewrite:trace2] [pid 2990:tid 140129163253504] mod_rewrite.c(482): [client 172.31.99.11:33626] 172.31.99.11 - - [testpdns.gosport.local/sid#7f727a1f6880][rid#7f727a13a0a0/initial] rewrite '/app/v1/remote/servertime' -> '/index.html'
[Mon Jan 04 11:32:32.856917 2021] [rewrite:trace2] [pid 2990:tid 140129163253504] mod_rewrite.c(482): [client 172.31.99.11:33626] 172.31.99.11 - - [testpdns.gosport.local/sid#7f727a1f6880][rid#7f727a13a0a0/initial] local path result: /index.html
[Mon Jan 04 11:32:32.856935 2021] [rewrite:trace2] [pid 2990:tid 140129163253504] mod_rewrite.c(482): [client 172.31.99.11:33626] 172.31.99.11 - - [testpdns.gosport.local/sid#7f727a1f6880][rid#7f727a13a0a0/initial] prefixed with document_root to /var/www/powerdns/frontend/index.html
[Mon Jan 04 11:32:32.856950 2021] [rewrite:trace1] [pid 2990:tid 140129163253504] mod_rewrite.c(482): [client 172.31.99.11:33626] 172.31.99.11 - - [testpdns.gosport.local/sid#7f727a1f6880][rid#7f727a13a0a0/initial] go-ahead with /var/www/powerdns/frontend/index.html [OK]

==> /var/log/apache2/testpdns.gosport.local-access.log <==
172.31.99.11 - - [04/Jan/2021:11:32:32 +0000] "GET /app/v1/remote/servertime HTTP/1.1" 200 848 "-" "curl/7.64.0"

from pdnsmanager.

loewexy avatar loewexy commented on July 17, 2024

Please use codeblocks so that your answer is readable.

Your URL for curl is wrong and therefore everything else does not work. You should habe /api not /app

from pdnsmanager.

abtme avatar abtme commented on July 17, 2024

ok - my fault

somehow missed the installation of php for apache2, and this created the tables in my database along with an entry for the admin user I setup.

however when I login I see

missing-menu

api now works - sorry about that.

api

from pdnsmanager.

loewexy avatar loewexy commented on July 17, 2024

Go to the developer console an check the requests made for errors.

from pdnsmanager.

abtme avatar abtme commented on July 17, 2024

I dont know how to do that

but do you mean F12 in the browser and check "console"

if so

this is all I see

console error

from pdnsmanager.

loewexy avatar loewexy commented on July 17, 2024

Yeah but you need to go to the network tab.

from pdnsmanager.

abtme avatar abtme commented on July 17, 2024

Dont know what im loooking for

do you want me to post what I see ?

from pdnsmanager.

loewexy avatar loewexy commented on July 17, 2024

Yes open that tab then do a fresh login. All HTTP calls done by the application should be there.

from pdnsmanager.

abtme avatar abtme commented on July 17, 2024

I dont see any errors

from pdnsmanager.

loewexy avatar loewexy commented on July 17, 2024

Can you post a screenshot of them?

from pdnsmanager.

abtme avatar abtme commented on July 17, 2024

I got it working on Debian - by adding apache2 php and php-dev and libmodphp
did the same on ubuntu

from pdnsmanager.

abtme avatar abtme commented on July 17, 2024

also looking at the contents of the data on network - it had credentials in it, especially the session data.

suspect its because the http not https

from pdnsmanager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.