Hi
I'm not sure if this has been asked before or whether anyone has thought about doing it, but I would like to set a sub-domain for accessing the WebGUI of OMV. To explain further, I'm setting up Nextcloud inside a Docker container and I would like to keep the default port 80, however, this clashes with OMV's WebGUI also running on that very same port. To be able to run OMV and Nextcloud's web interfaces together, in theory I should be able to run them each on their own sub-domain. For example
cloud.openmediavault.lan > Nextcloud's Web interface
admin.openmediavault.lan > OMV's WebGUI
I know that OMV runs off a NGINX server and it's config file is found at /etc/nginx/sites-enabled/openmediavault-webgui (symbolic link to /etc/nginx/sites-avaliable). Here's the contents of openmediavault-webgui
server {
server_name openmediavault-webgui;
root /var/www/openmediavault;
index index.php;
autoindex off;
server_tokens off;
sendfile on;
large_client_header_buffers 4 32k;
client_max_body_size 25M;
error_log /var/log/nginx/openmediavault-webgui_error.log error;
access_log /var/log/nginx/openmediavault-webgui_access.log combined;
error_page 404 = /404.php;
location /404.html {
internal;
}
location /extjs6/ {
alias /usr/share/javascript/extjs6/;
expires 2d;
}
location ~ ^/(css|fonts|js|images)/ {
expires 2d;
}
location /favicon {
expires 14d;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php-fpm-openmediavault-webgui.sock;
fastcgi_index index.php;
fastcgi_read_timeout 60s;
include fastcgi.conf;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
listen 8080;
include /etc/nginx/openmediavault-webgui.d/*.conf;
}
I changed line 1 to > server_name admin.openmediavault.lan;
added 127.0.0.1 admin.openmediavault.lan to the /etc/hosts file
and finally rebooted OMV. I could still access OMV via its IP address but the new domain name didn't work. I get a couldn't resolve domain error.
Is there as easy way of doing this or something I'm missing? I don't mind tweaking with the backend of the OS and using a CLI if needed.
Maybe as a suggestion for future builds could we get more options added to the General Settings > Web Administration page such as setting sub-domains so that this can be done via GUI.
Many thanks in advance.
Will