Discover Centmin Mod today
Register Now

Feedback Domain being redirected ?

Discussion in 'AlmaLinux 8 & Rocky Linux 8 Beta Testing' started by cloud9, Mar 5, 2023.

  1. cloud9

    cloud9 Premium Member Premium Member

    423
    117
    43
    Oct 6, 2015
    England
    Ratings:
    +216
    Local Time:
    4:42 AM
    1.25.3
    10.6.x
    The following test environment information is needed relevant to your EL8 server installation. Please provide the info in BBCODE CODE/CODEB tags for better formatting.

    1. Hetzner CX21 40GB

    2. 1st:
    123.09beta01.b809 #Mon Apr 25 11:00:11 UTC 2022
    ..
    last 10:
    130.00beta01.b271 #Thu Feb 9 20:08:43 UTC 2023
    130.00beta01.b275 #Wed Feb 15 14:03:10 UTC 2023
    130.00beta01.b277 #Wed Feb 22 21:05:37 UTC 2023
    130.00beta01.b277 #Wed Feb 22 21:07:08 UTC 2023
    130.00beta01.b277 #Thu Feb 23 19:21:10 UTC 2023
    130.00beta01.b277 #Fri Mar 3 18:44:29 UTC 2023
    130.00beta01.b277 #Fri Mar 3 18:45:45 UTC 2023
    130.00beta01.b277 #Sat Mar 4 19:14:36 UTC 2023
    130.00beta01.b277 #Sun Mar 5 07:50:25 UTC 2023
    130.00beta01.b277 #Sun Mar 5 12:08:31 UTC 2023


    3.

    Architecture: x86_64

    CPU op-mode(s): 32-bit, 64-bit
    Byte Order: Little Endian
    CPU(s): 2
    On-line CPU(s) list: 0,1
    Thread(s) per core: 1
    Core(s) per socket: 2
    Socket(s): 1
    NUMA node(s): 1
    Vendor ID: GenuineIntel
    CPU family: 6
    Model: 85
    Model name: Intel Xeon Processor (Skylake, IBRS)
    Stepping: 4
    CPU MHz: 2099.998
    BogoMIPS: 4199.99
    Hypervisor vendor: KVM
    Virtualization type: full
    L1d cache: 32K
    L1i cache: 32K
    L2 cache: 4096K
    L3 cache: 16384K
    NUMA node0 CPU(s): 0,1
    Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd rsb_ctxsw ibrs ibpb fsgsbase bmi1 hle avx2 smep bmi2 erms invpcid rtm avx512f avx512dq rdseed adx smap clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 arat pku ospke md_clear spec_ctrl


    total used free shared buff/cache available
    Mem: 3693 841 795 188 2056 2389
    Low: 3693 2897 795
    High: 0 0 0
    Swap: 1023 5 1018
    Total: 4717 847 1813

    Filesystem Type Size Used Avail Use% Mounted on
    devtmpfs devtmpfs 1.8G 0 1.8G 0% /dev
    tmpfs tmpfs 1.9G 0 1.9G 0% /dev/shm
    tmpfs tmpfs 1.9G 193M 1.7G 11% /run
    tmpfs tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
    /dev/sda1 ext4 38G 15G 22G 40% /
    /dev/loop0 ext4 5.8G 25M 5.5G 1% /tmp
    tmpfs tmpfs 370M 0 370M 0% /run/user/0


    Ok so a new VPS with Alma8 installed and CMM beta alma8 code

    Website installed (SITE1) under option 22 - Wordpress and HTTPS only with letsencrypt

    Type the domain into browser https://SITE1 - browser shows SITE1 which is correct - been working for a couple of weeks now

    Today Just installed a second site (SITE2) under option 22 - Wordpress - with Letsencrypt HTTPS only

    Type in https://SITE2 in browser

    Browser redirects and shows https://SITE1

    My DNS records are as follows

    SITE 1
    A Record Host = @ VALUE=VPS IP address
    A Record Host= SITE1.co.uk VALUE=VPS IP ADDRESS
    CNAME Record Host=www Value=SITE1.co.uk

    SITE 2
    A Record Host = @ VALUE=VPS IP address
    A Record Host= SITE2.co.uk VALUE=VPS IP ADDRESS
    CNAME Record Host=www Value=SITE2.co.uk
     
  2. cloud9

    cloud9 Premium Member Premium Member

    423
    117
    43
    Oct 6, 2015
    England
    Ratings:
    +216
    Local Time:
    4:42 AM
    1.25.3
    10.6.x
    Ok, thought it was a cache issue or dns

    Fixed it - could be a bug

    Had to restart nginx - SITE 2 now loads as SITE 2 and doesnt show SITE 1

    Maybe a bug ?

    This is the third wp site on the server - the other 2 installed and viewed in the browser correctly, just the third (SITE2 above) that didnt
     
  3. eva2000

    eva2000 Administrator Staff Member

    52,186
    11,998
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,501
    Local Time:
    1:42 PM
    Nginx 1.25.x
    MariaDB 10.x
    For each of the 3 domains, what is output of these commands in ssh
    Code (Text):
    curl -I https://domain.com
    

    Code (Text):
    curl -I https://www.domain.com
    

    Code (Text):
    curl -I http://domain.com
    

    Code (Text):
    curl -I http://www.domain.com
    

    wrap output in CODE tags
     
  4. cloud9

    cloud9 Premium Member Premium Member

    423
    117
    43
    Oct 6, 2015
    England
    Ratings:
    +216
    Local Time:
    4:42 AM
    1.25.3
    10.6.x
    Code:
    SITE 1 - Always worked
    
    
    
    
    
    [12:16][root@server.MYSERVER.com ~]# curl -I https://SITE1.co.uk
    
    HTTP/1.1 200 OK
    
    Date: Mon, 06 Mar 2023 12:17:37 GMT
    
    Content-Type: text/html; charset=UTF-8
    
    Connection: keep-alive
    
    Vary: Accept-Encoding
    
    Link: <https://SITE1.co.uk/wp-json/>; rel="https://api.w.org/"
    
    Link: <https://SITE1.co.uk/wp-json/wp/v2/pages/220>; rel="alternate"; type="application/json"
    
    Link: <https://SITE1.co.uk/>; rel=shortlink
    
    Server: nginx centminmod
    
    X-Powered-By: centminmod
    
    X-Cache: MISS
    
    X-Cache-2: BYPASS
    
    X-Xss-Protection: 1; mode=block
    
    X-Content-Type-Options: nosniff
    
    
    
    [12:17][root@server.MYSERVER.com ~]# curl -I https://www.SITE1.co.uk
    
    HTTP/1.1 301 Moved Permanently
    
    Date: Mon, 06 Mar 2023 12:18:00 GMT
    
    Content-Type: text/html; charset=UTF-8
    
    Connection: keep-alive
    
    X-Redirect-By: WordPress
    
    Location: https://SITE1.co.uk/
    
    Server: nginx centminmod
    
    X-Powered-By: centminmod
    
    X-Cache: MISS
    
    X-Cache-2: BYPASS
    
    X-Xss-Protection: 1; mode=block
    
    X-Content-Type-Options: nosniff
    
    
    
    [12:18][root@server.MYSERVER.com ~]# curl -I http://SITE1.co.uk
    
    HTTP/1.1 302 Moved Temporarily
    
    Date: Mon, 06 Mar 2023 12:18:17 GMT
    
    Content-Type: text/html
    
    Content-Length: 138
    
    Connection: keep-alive
    
    Location: https://SITE1.co.uk/
    
    Server: nginx centminmod
    
    X-Powered-By: centminmod
    
    
    
    [12:18][root@server.MYSERVER.com ~]# curl -I http://www.SITE1.co.uk
    
    HTTP/1.1 302 Moved Temporarily
    
    Date: Mon, 06 Mar 2023 12:18:46 GMT
    
    Content-Type: text/html
    
    Content-Length: 138
    
    Connection: keep-alive
    
    Location: https://SITE1.co.uk/
    
    Server: nginx centminmod
    
    X-Powered-By: centminmod
    
    
    
    SITE 2 - Always worked
    
    
    
    
    
    [12:18][root@server.MYSERVER.com ~]# curl -I https://SITE2.co.uk
    
    HTTP/1.1 200 OK
    
    Date: Mon, 06 Mar 2023 12:20:00 GMT
    
    Content-Type: text/html; charset=UTF-8
    
    Connection: keep-alive
    
    Vary: Accept-Encoding
    
    Link: <https://SITE2.co.uk/wp-json/>; rel="https://api.w.org/"
    
    Link: <https://SITE2.co.uk/wp-json/wp/v2/pages/220>; rel="alternate"; type="application/json"
    
    Link: <https://SITE2.co.uk/>; rel=shortlink
    
    Server: nginx centminmod
    
    X-Powered-By: centminmod
    
    X-Cache: MISS
    
    X-Cache-2: BYPASS
    
    X-Xss-Protection: 1; mode=block
    
    X-Content-Type-Options: nosniff
    
    
    
    [12:20][root@server.MYSERVER.com ~]# curl -I https://www.SITE2.co.uk
    
    HTTP/1.1 301 Moved Permanently
    
    Date: Mon, 06 Mar 2023 12:20:13 GMT
    
    Content-Type: text/html; charset=UTF-8
    
    Connection: keep-alive
    
    X-Redirect-By: WordPress
    
    Location: https://SITE2.co.uk/
    
    Server: nginx centminmod
    
    X-Powered-By: centminmod
    
    X-Cache: MISS
    
    X-Cache-2: BYPASS
    
    X-Xss-Protection: 1; mode=block
    
    X-Content-Type-Options: nosniff
    
    
    
    [12:20][root@server.MYSERVER.com ~]# curl -I http://SITE2.co.uk
    
    HTTP/1.1 302 Moved Temporarily
    
    Date: Mon, 06 Mar 2023 12:20:25 GMT
    
    Content-Type: text/html
    
    Content-Length: 138
    
    Connection: keep-alive
    
    Location: https://SITE2.co.uk/
    
    Server: nginx centminmod
    
    X-Powered-By: centminmod
    
    
    
    [12:20][root@server.MYSERVER.com ~]# curl -I http://www.SITE2.co.uk
    
    HTTP/1.1 302 Moved Temporarily
    
    Date: Mon, 06 Mar 2023 12:20:38 GMT
    
    Content-Type: text/html
    
    Content-Length: 138
    
    Connection: keep-alive
    
    Location: https://SITE2.co.uk/
    
    Server: nginx centminmod
    
    X-Powered-By: centminmod
    
    
    
    
    
    
    
    SITE 3 - The one that didnt work till I restarted NGINX
    
    
    
    [12:20][root@server.MYSERVER.com ~]# curl -I https://SITE3.co.uk
    
    HTTP/1.1 200 OK
    
    Date: Mon, 06 Mar 2023 12:21:11 GMT
    
    Content-Type: text/html; charset=UTF-8
    
    Connection: keep-alive
    
    Vary: Accept-Encoding
    
    Link: <https://SITE3.co.uk/wp-json/>; rel="https://api.w.org/"
    
    Link: <https://SITE3.co.uk/wp-json/wp/v2/pages/55>; rel="alternate"; type="application/json"
    
    Link: <https://SITE3.co.uk/>; rel=shortlink
    
    Server: nginx centminmod
    
    X-Powered-By: centminmod
    
    X-Cache: MISS
    
    X-Cache-2: BYPASS
    
    X-Xss-Protection: 1; mode=block
    
    X-Content-Type-Options: nosniff
    
    
    
    [12:21][root@server.MYSERVER.com ~]# curl -I https://www.SITE3.co.uk
    
    HTTP/1.1 301 Moved Permanently
    
    Date: Mon, 06 Mar 2023 12:21:26 GMT
    
    Content-Type: text/html; charset=UTF-8
    
    Connection: keep-alive
    
    X-Redirect-By: WordPress
    
    Location: https://SITE3.co.uk/
    
    Server: nginx centminmod
    
    X-Powered-By: centminmod
    
    X-Cache: MISS
    
    X-Cache-2: BYPASS
    
    X-Xss-Protection: 1; mode=block
    
    X-Content-Type-Options: nosniff
    
    
    
    [12:21][root@server.MYSERVER.com ~]# curl -I http://SITE3.co.uk
    
    HTTP/1.1 302 Moved Temporarily
    
    Date: Mon, 06 Mar 2023 12:21:50 GMT
    
    Content-Type: text/html
    
    Content-Length: 138
    
    Connection: keep-alive
    
    Location: https://SITE3.co.uk/
    
    Server: nginx centminmod
    
    X-Powered-By: centminmod
    
    
    
    [12:21][root@server.MYSERVER.com ~]# curl -I http://www.SITE3.co.uk
    
    HTTP/1.1 302 Moved Temporarily
    
    Date: Mon, 06 Mar 2023 12:22:08 GMT
    
    Content-Type: text/html
    
    Content-Length: 138
    
    Connection: keep-alive
    
    Location: https://SITE3.co.uk/
    
    Server: nginx centminmod
    
    X-Powered-By: centminmod
    
    
    
     
  5. eva2000

    eva2000 Administrator Staff Member

    52,186
    11,998
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,501
    Local Time:
    1:42 PM
    Nginx 1.25.x
    MariaDB 10.x
    oh you mean site3 works now? I thought you meant even after nginx restart it didn't work?
     
  6. cloud9

    cloud9 Premium Member Premium Member

    423
    117
    43
    Oct 6, 2015
    England
    Ratings:
    +216
    Local Time:
    4:42 AM
    1.25.3
    10.6.x
    @eva2000

    yes, sorry - it didnt work after option 22 - checked everything - restarted nginx - it then worked as should (ie not going to another domain)
     
  7. cloud9

    cloud9 Premium Member Premium Member

    423
    117
    43
    Oct 6, 2015
    England
    Ratings:
    +216
    Local Time:
    4:42 AM
    1.25.3
    10.6.x
    I have 3 more sites to put on the server so will do a check on these as I go and report back
     
  8. eva2000

    eva2000 Administrator Staff Member

    52,186
    11,998
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,501
    Local Time:
    1:42 PM
    Nginx 1.25.x
    MariaDB 10.x
    If it doesn't work before restart do a nginx config check via command
    Code (Text):
    nginx -t