Preview Website - redirecting infinity

SYSTEM INFORMATION
OS type and version Ubuntu Linux 22.04.3
Webmin version 2.105
Usermin version 2.005
Virtualmin version 7.9.0
Theme version 21.09.5
Package updates All installed packages are up to date

This seems silly but something has gone wrong

I went to Virtualmin -> Web Configuration -> Preview Website as I have done many a time and got

Well there are no cookies so I go to try to resolve why the VS is redirecting (it shouldn’t be)

Virtualmin -> Web Configuration -> Website Redirects is empty

Virtualmin -> Web Configuration -> Edit Proxy Website enabled is set to no

Virtualmin -> Web Configuration -> Configure Nginx Website -> Url Rewriting took an age to load (the progress bar moving) but eventually showed nothing

Yet it is redirecting to a directory that does exist and one that has content (index.html). Even entering domain.com/roundcube ends up redirecting to the same end point.

A VM reboot

Still redirecting!
Well not much of a progress
but now “Preview Website” at least takes me to the !correct! location

not really -
https://vm.com:10000/virtual-server/link.cgi/xxx.xx.xxx.xxx/http://www.domain.uk/

is not the same as https:/www.domain.uk/ which is still redirecting to https:/www.domain.uk/dev/

Still cannot see why this is redirecting

could you share nginx configuration of virtual server? And also what is software running in your virtual server?

My trick to find the reason for a small issue in many files is using grep. Eg, to find what causing redirect to /dev/, do grep "/dev/" -r ./home/domain/

In this VS software - nothing special just a simple html page in one subdirectory and a simple php site in another

	server_name ####.com www.####.com mail.####.com;
	listen IPv4;
	listen [IPv6];
	root /home/lush/public_html;
	index index.php index.htm index.html;
	access_log /var/log/virtualmin/####.com_access_log;
	error_log /var/log/virtualmin/####.com_error_log;
	fastcgi_param GATEWAY_INTERFACE CGI/1.1;
	fastcgi_param SERVER_SOFTWARE nginx;
	fastcgi_param QUERY_STRING $query_string;
	fastcgi_param REQUEST_METHOD $request_method;
	fastcgi_param CONTENT_TYPE $content_type;
	fastcgi_param CONTENT_LENGTH $content_length;
	fastcgi_param SCRIPT_FILENAME "/home/lush/public_html$fastcgi_script_name";
	fastcgi_param SCRIPT_NAME $fastcgi_script_name;
	fastcgi_param REQUEST_URI $request_uri;
	fastcgi_param DOCUMENT_URI $document_uri;
	fastcgi_param DOCUMENT_ROOT /home/lush/public_html;
	fastcgi_param SERVER_PROTOCOL $server_protocol;
	fastcgi_param REMOTE_ADDR $remote_addr;
	fastcgi_param REMOTE_PORT $remote_port;
	fastcgi_param SERVER_ADDR $server_addr;
	fastcgi_param SERVER_PORT $server_port;
	fastcgi_param SERVER_NAME $server_name;
	fastcgi_param PATH_INFO $fastcgi_path_info;
	fastcgi_param HTTPS $https;
	location ^~ /.well-known/ {
		try_files $uri /;
	}
	location ~ "\.php(/|$)" {
		default_type text/plain;
		try_files $uri $fastcgi_script_name =404;
		fastcgi_pass unix:/run/php/0000000000000000.sock;
	}
	fastcgi_split_path_info "^(.+\.php)(/.+)$";
	location /cgi-bin/ {
		gzip off;
		root /home/lush/cgi-bin;
		fastcgi_pass unix:/var/fcgiwrap/0000000000000000.sock/socket;
		fastcgi_param SCRIPT_FILENAME "/home/lush$fastcgi_script_name";
		fastcgi_param GATEWAY_INTERFACE CGI/1.1;
		fastcgi_param SERVER_SOFTWARE nginx;
		fastcgi_param QUERY_STRING $query_string;
		fastcgi_param REQUEST_METHOD $request_method;
		fastcgi_param CONTENT_TYPE $content_type;
		fastcgi_param CONTENT_LENGTH $content_length;
		fastcgi_param SCRIPT_NAME $fastcgi_script_name;
		fastcgi_param REQUEST_URI $request_uri;
		fastcgi_param DOCUMENT_URI $document_uri;
		fastcgi_param DOCUMENT_ROOT /home/lush/public_html;
		fastcgi_param SERVER_PROTOCOL $server_protocol;
		fastcgi_param REMOTE_ADDR $remote_addr;
		fastcgi_param REMOTE_PORT $remote_port;
		fastcgi_param SERVER_ADDR $server_addr;
		fastcgi_param SERVER_PORT $server_port;
		fastcgi_param SERVER_NAME $server_name;
		fastcgi_param PATH_INFO $fastcgi_path_info;
		fastcgi_param HTTPS $https;
	}
	listen IPv4:443 ssl;
	listen [IPv6]:443 ssl;
	ssl_certificate /etc/ssl/virtualmin/0000000000000000/ssl.combined;
	ssl_certificate_key /etc/ssl/virtualmin/0000000000000000/ssl.key;
	rewrite_log off;
}

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