Jump to content
Froxlor Forum

cscholz

Members
  • Posts

    19
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by cscholz

  1. Did not took ages.

    There is a hostname check introduced with 2.1

    lib/init.php
     

    Quote

     

    [...]

     * Show nice note if requested domain is "unknown" to froxlor and thus is being lead to its vhost
     */
    $req_host = UI::getCookieHost();
    if ($req_host != Settings::Get('system.hostname') &&
                Settings::Get('panel.is_configured') == 1 &&
                    !filter_var($req_host, FILTER_VALIDATE_IP) && (
                    empty(Settings::Get('system.froxloraliases')) ||
                    (!empty(Settings::Get('system.froxloraliases')) && !in_array($req_host, array_map('trim', explode(',', Settings::Get('system.froxloraliases')))))
    )) {
            // not the froxlor system-hostname, show info page for domains not configured in froxlor
            $redirect_file = FileDir::getUnknownDomainTemplate($req_host);
            header('Location: '.$redirect_file);
            die();
    }
    [...]

     

    unfortunately my hostname set in Settings  » System settings was wrong. After correting, it works.

  2. server {
            listen 12.34.56.78:443 ssl;
            server_name frx.domain.tld;
            include /etc/nginx/acme.conf;
            access_log /var/customers/logs/xxx-access.log combined;
            error_log /var/customers/logs/xxx-error.log error;
            root /var/customers/webs/...;
    
            ssl_certificate         /etc/apache2/ssl/domain.tld_fullchain.pem;
            ssl_certificate_key     /etc/apache2/ssl/domain.tld.key;
    
    
            location / {
                    index index.php index.html index.htm;
                    try_files $uri $uri/ @rewrites;
            }
    
            location @rewrites {
                    rewrite ^ /index.php last;
            }
    
            location ^~ /goaccess {
                    alias /var/customers/webs/.../;
                    auth_basic "Restricted Area";
                    auth_basic_user_file /etc/nginx/froxlor-htpasswd/....htpasswd;
            }
    
            location ~ ^(.+?\.php)(/.*)?$ {
                    try_files /7e53f8a4f6ea46a758c3463b30a73293.htm @php;
            }
    
            location @php {
                    try_files $1 =404;
    
                    include /etc/nginx/fastcgi_params;
                    fastcgi_split_path_info ^(.+?\.php)(/.*)$;
                    fastcgi_param SCRIPT_FILENAME $request_filename;
                    fastcgi_param PATH_INFO $2;
                    fastcgi_param HTTPS on;
                   fastcgi_pass unix:/var/run/9-...o-php-fpm.socket;
                    fastcgi_index index.php;
            }
    
    
    }

     

  3. I've tried froxlor 2.1 rc3. Extract the files into the froxlor root directory and set the owner.

    After reloading froxlor (published by subdomain) shows "Domain not configured" instead of the login.

    The subdomain is added in froxlor and assigend to a customer and redirects to https. The https website is configured manually and not by froxlor.

    On which parameter is the decision taken to show the notice message?

  4. Okay. Got it, thanks!

    Three API calls via curl as further examples from my test run for all readers of the forum

    Create eMail

    Quote

    curl -v \
      --header "Content-Type: application/json" \
      --header "Authorization: Basic $AUTH" \
      --request POST \
      --data  '{"command": "Emails.add","params":{"email_part":"test123","domain":"mydomain.com"}}' https://froxlor.mydomain.com/api.php

    Create Forward

    Quote

    curl -v \
      --header "Content-Type: application/json" \
      --header "Authorization: Basic $AUTH" \
      --request POST \
      --data  '{"command": "EmailForwarders.add","params":{"emailaddr":"test123@mydomain.com","destination":"recipient@mydomain.com"}}' https://froxlor.mydomain.com/api.php

    Delete eMail

    Quote

    curl -v \
      --header "Content-Type: application/json" \
      --header "Authorization: Basic $AUTH" \
      --request POST \
      --data  '{"command": "Emails.delete","params":{"emailaddr":"test123@mydomain.com"}}' https://froxlor.mydomain.com/api.php

    BR Christian

  5. Hi,

    I'm strugeling on my first steps with the API. I've read the documentation and using curl to ensure that the API calls are correct.

    bash variables are set and working.

    Quote

    FROXLOR_API_KEY=as471...
    FROXLOR_API_SECRET=kp471...
    AUTH=$(echo -ne "$FROXLOR_API_KEY:$FROXLOR_API_SECRET" | base64 --wrap 0)


    What works is the readout via API using the example from the documentation:

    Quote

    curl -v \
      --header "Content-Type: application/json" \
      --header "Authorization: Basic $AUTH" \
      --request POST \
      --data  '{"command":"Froxlor.listFunctions"}' \
      https://domain.tld/api.php

    What does not work is the creation of an email address. 

    Quote

    curl -v \
      --header "Content-Type: application/json" \
      --header "Authorization: Basic $AUTH" \
      --request POST \
      --data  '{"command":"Emails.add","email_part": "test86","domain": "domain.tld"}' https://domain.tld/api.php

    [...]

     

     

    The API tells me: Requested parameter \"email_part\" could not be found for \"Emails:add\""

    What am I doing wrong?

  6. Thanks for the update.

    With the following workaround I was able to eliminate the errors. Up to now there are no side effects.

    lib/Froxlor/PhpHelper.php:67

    //                      $subject = htmlentities($subject, $quote_style, $charset);
                            $subject = htmlentities((string)$subject, $quote_style, $charset);

     

    vendor/froxlor/idna-convert-legacy/src/IdnaConvert.php:191

    //        $input = trim($input);
              $input = trim((string)$input);

     

    admin_domains.php:688

    //        $row['termination_date'] = str_replace("0000-00-00", "", $row['termination_date']);
              $row['termination_date'] = str_replace("0000-00-00", "", (string)$row['termination_date']);

    customer_domains.php:509

    //      $row['termination_date'] = str_replace("0000-00-00", "", ($row['termination_date']);
            $row['termination_date'] = str_replace("0000-00-00", "", (string)$row['termination_date']);

     

  7. I'm not sure if I understood it correctly. But in the following example the subdomain is not connected to another domain.
    The red cross to delete the subdomain is not available.

    image.thumb.png.c05dde194ad7d67d2c65906b313deb48.png

    As manual workaround replacing edit in the edit link with delete works.

    customer_domains.php?...domains&action=edit&id=...
    
    customer_domains.php?...domains&action=delete&id=...

    For me it looks like a bug.

×
×
  • Create New...