Menu

#66 Subdomain name switching to hostname

v1.0_(example)
open
nobody
naviserver (1)
1
2021-02-02
2020-12-03
Antanas
No

Debian server with \po[ installed and worked well for some time. Cannot trace back what parameters changed. I stopped nginx for reducing possible side effects, using NS ony. I can open ]po[ login page using http://sub.domain.com:8000 , but after clicking "Connect" button the domain name in URL switches to servers hostname and the browser naturally shows "unable to connect". Where to search for a cause?
]project-open[ Version: 5.0.3.0.0
OS Platform: Linux
OS Version: 4.9.0-14-amd64
TCL Version: 8.5.18
Web Server Version: 4.99

Discussion

  • Frank Bergmann

    Frank Bergmann - 2020-12-03

    Hi Antanas,

    after clicking

    The server probably does a redirect to the original port.
    Just make sure port 80 is also forwarded to the NaviServer...

    Put Chrome in debugging mode (developer tools), and you'll see more.

    Search in the database in the table apm_parameter_values for a value corresponding to your old server name.

    Cheers
    Frank

     
  • Frank Bergmann

    Frank Bergmann - 2020-12-04

    Hi,

    Please search for "www1" in apm_parameter_values via SQL and replace with "sub.domain.com"...

    Cheers
    Frank

     
  • Antanas

    Antanas - 2020-12-04

    Hi Frank,

    not in this case:

    projop=# SELECT * FROM apm_parameter_values WHERE attr_value LIKE '%www1%';
     value_id | package_id | parameter_id | attr_value 
    ----------+------------+--------------+------------
    (0 rows)
    
     
  • Antanas

    Antanas - 2020-12-21

    The problem is reproducible.
    1. On fresh ]po[ Debian install (following official recipe with all updates proposed through webUI) domain name remains intact while browsing the ]po[ site.
    2. After

    export CVSROOT=:pserver:anonymous@cvs.project-open.net:/home/cvsroot
    cvs update -PdA
    

    the starting domain name switches unexpectedly to server's hostname – wrong!
    There are too many changed files (4335) to track down it fast.

     

    Last edit: Antanas 2020-12-21
  • Frank Bergmann

    Frank Bergmann - 2020-12-23

    Hi Antanas,

    There are two parameters controlling redirection.
    Check:

    select * from apm_parameter_values where attr_value like '%yourdomain%';
    

    Then check for the apm_parameter with the respective parameter_id.

    Maybe also check ~/etc/config.tcl for the "hostname" parameter and set to the right URL.

    Cheers
    Frank

     
    • Anonymous

      Anonymous - 2020-12-28
      Post awaiting moderation.
  • Anonymous

    Anonymous - 2021-01-04
    Post awaiting moderation.
  • Antanas

    Antanas - 2021-01-04

    Hi Frank,

    could you please moderate my previous posts send as Anonymous?

    Sincerely,
    Antanas

     
  • Antanas

    Antanas - 2021-02-02

    Hi, Frank,

    I should repeat statements from my prior post which was sent accidentally as Anonymous a month ago.
    Two servers are running PO instances: PO1 – production, PO2 – testing with demo data.
    Both runs same PO version and both haven't the switching to wrong domain name (localhost) problem.
    I'm backing up the PO1 data (Admin>Backup>New backup) and restoring it into PO2 server.
    PO2 suddenly suffers from redirecting to wrong domain name.
    What difference between two PO installs (some package? config value?) could impact on such unexpected behavior?
    How to trace it down?

     

Anonymous
Anonymous

Add attachments
Cancel