Running Remotely.one and Virtualmin - Can't get Nginx to load Remotely.one

Ubuntu 20.04 - Single public IP, NAT to internal private IP.
Remotely.one is a RMM tool that runs on Nginx web server.
Virtualmin works fine, but since installing Virtualmin, Remotely.one no longer works.

Nginx Conf files, slightly edited.
remotely.domain.co.conf -

server {
server_name remotely.domain.co *.remotely.domain.co;
location / {
proxy_pass http://localhost:5000;
proxyhttpversion 1.1;
proxysetheader Upgrade $http_upgrade;
proxysetheader Connection keep-alive;
proxysetheader Host $host;
proxycachebypass $http_upgrade;
proxysetheader X-Forwarded-For $proxyaddxforwardedfor;
proxysetheader X-Forwarded-Proto $scheme;
}
location /BrowserHub {
proxy_pass http://localhost:5000;
proxyhttpversion 1.1;
proxysetheader Upgrade $http_upgrade;
proxysetheader Connection ā€œupgradeā€;
proxysetheader Host $host;
proxycachebypass $http_upgrade;
proxysetheader X-Forwarded-For $proxyaddxforwardedfor;
proxysetheader X-Forwarded-Proto $scheme;
}
location /AgentHub {
proxy_pass http://localhost:5000;
proxyhttpversion 1.1;
proxysetheader Upgrade $http_upgrade;
proxysetheader Connection ā€œupgradeā€;
proxysetheader Host $host;
proxycachebypass $http_upgrade;
proxysetheader X-Forwarded-For $proxyaddxforwardedfor;
proxysetheader X-Forwarded-Proto $scheme;
}
location /ViewerHub {
proxy_pass http://localhost:5000;
proxyhttpversion 1.1;
proxysetheader Upgrade $http_upgrade;
proxysetheader Connection ā€œupgradeā€;
proxysetheader Host $host;
proxycachebypass $http_upgrade;
proxysetheader X-Forwarded-For $proxyaddxforwardedfor;
proxysetheader X-Forwarded-Proto $scheme;
}
location /CasterHub {
proxy_pass http://localhost:5000;
proxyhttpversion 1.1;
proxysetheader Upgrade $http_upgrade;
proxysetheader Connection ā€œupgradeā€;
proxysetheader Host $host;
proxycachebypass $http_upgrade;
proxysetheader X-Forwarded-For $proxyaddxforwardedfor;
proxysetheader X-Forwarded-Proto $scheme;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/remotely.domain.co/fullchain.pem; # managed by Certbot
sslcertificatekey /etc/letsencrypt/live/remotely.domain.co/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = remotely.domain.co) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name remotely.domain.co *.remotely.domain.co;
return 404; # managed by Certbot
}

server.domain.co.conf -

server {
server_name domain.co www.domain.co;
listen 192.168.124.1;
root /home/domain/public_html;
index index.php index.htm index.html;
accesslog /var/log/virtualmin/domain.coaccess_log;
errorlog /var/log/virtualmin/domain.coerror_log;
fastcgiparam GATEWAYINTERFACE CGI/1.1;
fastcgiparam SERVERSOFTWARE nginx;
fastcgiparam QUERYSTRING $query_string;
fastcgiparam REQUESTMETHOD $request_method;
fastcgiparam CONTENTTYPE $content_type;
fastcgiparam CONTENTLENGTH $content_length;
fastcgiparam SCRIPTFILENAME /home/domain/publichtml$fastcgiscript_name;
fastcgiparam SCRIPTNAME $fastcgiscriptname;
fastcgiparam REQUESTURI $request_uri;
fastcgiparam DOCUMENTURI $document_uri;
fastcgiparam DOCUMENTROOT /home/domain/public_html;
fastcgiparam SERVERPROTOCOL $server_protocol;
fastcgiparam REMOTEADDR $remote_addr;
fastcgiparam REMOTEPORT $remote_port;
fastcgiparam SERVERADDR $server_addr;
fastcgiparam SERVERPORT $server_port;
fastcgiparam SERVERNAME $server_name;
fastcgiparam PATHINFO $fastcgipathinfo;
fastcgi_param HTTPS $https;
location ~ \.php(/|$) {
tryfiles $uri $fastcgiscript_name =404;
fastcgi_pass unix:/var/php-nginx/161755519879131.sock/socket;
}
fastcgisplitpath_info ^(.+\.php)(/.+)$;
listen 192.168.124.1:443 ssl;
ssl_certificate /home/domain/ssl.combined;
sslcertificatekey /home/domain/ssl.key;
fastcgireadtimeout 60;
}

Any ideas?

Hi,

Virtualmin should be installed using official install.sh script on clean system. If you installed it on already pre-configured, running system, it may require additional manual fixed (not recommended but possible if you know what youā€™re doing).

What is the version of Virtualmin Nginx module installed? This can be checked on System Settings ā‡¾ Features and Plugins page.

By the way, do not link anything to external websites, you can embed images and config files directly here.

Iā€™m sorry, I misspoke. I did use the Virtualmin install script with no issues. Afterward, I ran the Remotely.one install script which created the Nginx config file for Remotely.one. What in the Nginx conf would force only Virtual Servers in Virtualmin to work and prevent any additional custom config virtual host from working?

Nginx website is listed in Features and Plugins as Version 2.22.

Nothing. Virtualmin doesnā€™t care if you configure sites outside of Virtualmin, and it does nothing to prevent it.

But, youā€™re probably misunderstanding how nginx decides what to serve. Iā€™m not familiar enough with it to say exactly what it ought to look like, but I know in Apache having one VirtualHost that specifies an IP address will lead to less specific VirtualHosts not matching when some people would expect them to match. It looks like some of your server sections have IP addresses, while others do not.

2 Likes

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.