MeshCentral not reachable

I have installed meshcentral as explained on the wiki but when I try to connect I am redirected to this page instead of the meshcentral one.

This is the results of httpd -S:

Blockquote
[Thu Mar 03 23:04:51.625233 2022] [so:warn] [pid 20829] AH01574: module php5_module is already loaded, skipping
VirtualHost configuration:
*:80 is a NameVirtualHost
default server server.domain.cloud (/etc/httpd/conf.d/virtualhosts.conf:12)
port 80 namevhost server.domain.cloud (/etc/httpd/conf.d/virtualhosts.conf:12)
port 80 namevhost meshcentral.domain.cloud (/etc/httpd/conf.d/virtualhosts.conf:66)
port 80 namevhost meshcentral.domain.cloud (/etc/httpd/conf.d/zz_meshcentral.conf:17)
*:443 is a NameVirtualHost
default server server.domain.cloud (/etc/httpd/conf.d/nethserver.conf:46)
port 443 namevhost server.domain.cloud (/etc/httpd/conf.d/nethserver.conf:46)
port 443 namevhost server.domain.cloud (/etc/httpd/conf.d/ssl.conf:56)
port 443 namevhost meshcentral.domain.cloud (/etc/httpd/conf.d/virtualhosts.conf:24)
port 443 namevhost meshcentral.domain.cloud (/etc/httpd/conf.d/zz_meshcentral.conf:22)
ServerRoot: “/etc/httpd”
Main DocumentRoot: “/var/www/html”
Main ErrorLog: “/etc/httpd/logs/error_log”
Mutex authdigest-client: using_defaults
Mutex ssl-stapling: using_defaults
Mutex proxy: using_defaults
Mutex authn-socache: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir=“/run/httpd/” mechanism=default
Mutex mpm-accept: using_defaults
Mutex authdigest-opaque: using_defaults
Mutex proxy-balancer-shm: using_defaults
Mutex rewrite-map: using_defaults
PidFile: “/run/httpd/httpd.pid”
Define: _RH_HAS_HTTPPROTOCOLOPTIONS
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name=“apache” id=48
Group: name=“apache” id=48

This is the contents of zz_meshcentral.conf:

Blockquote
================= DO NOT MODIFY THIS FILE =================
<VirtualHost *:80>
IncludeOptional conf.d/default-virtualhost.inc

<VirtualHost :80>
ServerName meshcentral.domain.cloud
RedirectMatch 301 ^(?!/.well-known/acme-challenge/).
https://meshcentral.domain.cloud

<VirtualHost *:443>
ServerName meshcentral.domain.cloud
SSLEngine on
SSLProxyEngine on
ProxyPreserveHost On
RewriteEngine on
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule . ws://127.0.0.1:8989%{REQUEST_URI} [P]
ProxyPass / http://127.0.0.1:8989/
ProxyPassReverse / http://127.0.0.1:8989/

Can anyone tell me what I can do to fix the problem?

Thank you in advance

Did you browse to https://meshcentral.domain.cloud ?

Thank you for your answer!

Yes, I tried but I am redirected to the wrong page (the one in the attached image).

Can you ping meshcentral.domain.cloud ?

Let’s check if the service is running:

systemctl status meshcentral -l

Yes, I can ping meshcentral.domain.cloud both from inside the network or outside the network

The service is running:

[root@server ~]# systemctl status meshcentral -l
● meshcentral.service - MeshCentral Server
Loaded: loaded (/etc/systemd/system/meshcentral.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2022-03-03 22:36:38 CET; 11h ago
Main PID: 15402 (node)
CGroup: /system.slice/meshcentral.service
├─15402 /opt/rh/rh-nodejs10/root/usr/bin/node /opt/meshcentral/node_modules/meshcentral/meshcentral.js
└─15443 /opt/rh/rh-nodejs10/root/usr/bin/node /opt/meshcentral/node_modules/meshcentral/meshcentral.js --launch 15402

Mar 03 22:36:41 server.domain.it node[15402]: cmd:
Mar 03 22:36:41 server.domain.it node[15402]: ‘“mongodump” --uri=“mongodb://127.0.0.1:27017” --archive="/dev/null"’ }
Mar 03 22:36:41 server.domain.it node[15402]: WARNING: Unable to find mongodump, MongoDB database auto-backup will not be performed.
Mar 03 22:36:41 server.domain.it node[15402]: MeshCentral v0.9.93, Hybrid (LAN + WAN) mode, Production mode.
Mar 03 22:36:42 server.domain.it node[15402]: MeshCentral Intel(R) AMT server running on meshcentral.domain.cloud:4433.
Mar 03 22:36:42 server.domain.it node[15402]: Server has no users, next new account will be site administrator.
Mar 03 22:36:42 server.domain.it node[15402]: MeshCentral HTTP server running on port 8989, alias port 443.
Mar 03 22:36:42 server.domain.it node[15402]: Loaded web certificate from “https://meshcentral.domain.cloud”, host: “meshcentral.domain.cloud”
Mar 03 22:36:42 server.domain.it node[15402]: SHA384 cert hash: a1a9957c20922976d01ab32a1e616f75926b9ea9c277baba6f8696eb0e87dd1850ece6099bf0f4c97b04e3df4f0461fb
Mar 03 22:36:42 server.domain.it node[15402]: SHA384 key hash: 5aa6fd45c1f66591e3f7cb4f22844f104f98213683dd71e36ea692e4879c21e35c50f52811f4ce3e763aea27275da27f

Did you create a virtualhost/reverse proxy for MeshCentral in the server manager? It’s not needed and should be deleted.

Yes, I’ve created a virtualhost in the server-manager (meshcentral.domain.cloud) and i have run the command “config setprop meshcentral VirtualHost meshcentral.domain.cloud”.

I deleted the virtualhost in the server manager and now it’s working fine!

Thank you!

1 Like