How do I upload an index.html to the main domain

NethServer Version: NS8 latest
Module: nginx

Sorry but I can’t get my head around on how to upload a simple index.html to my servers main domain. I’ve read the docs but they are not NooB enough for me :wink:

Anybody some simple steps please?


Maybe here you can find what you’re looking for.

I can say “dumb october” for me. I answered an NS8 question with a NS7 answer. :expressionless:

In addition where (container, image, path) would a webpage be stored, for the main domain?

I never tried but I guess you’ve to install the Web Server module, and upload the file on it.

A default 403 splash page could be added in the future, like the NS7 one.

It cannot work as the Web server validator now forbids to use the server FQDN /cc @stephdl

I hoped the HTTP route priority was fixed in the core… Can we revert that change now?

1 Like

yes but I do not get the issue

Hi @schulzstefan

Install Webserver (Nginx)
After installation, it will be displayed like below.
Cick on Instance.

Open app

Create a VirtualHost (See P.P.S. below)
The VirtualHost will be using a directory and a user-name: 9001 for the first one, 9002 for the second one, etc…


On return, click SFTPGo

Login: user-name => 9001 / password => 9001 (after you can change the password)

Create your file index.html on your workstation with a good editor (NotePad++)
My file will be file-toto.html.

Click the icon to upload file


Click & drag your file inside the box and Submit.

The file is uploaded.

On your Debian (Rocky)
Install mlocate to locate files and folders
update the mlocate database.

apt update
apt install -y mlocate

Now you can look for 9001 and your-file (use the name of your file)

root@ns8:~# locate 9001 | grep file-toto.html

Check the owner:group of the file. (For me its is: 493216 502216)

root@ns8:~#  ls -als /home/webserver1/.local/share/containers/storage/volumes/websites/_data/9001/file-toto.html
4 -rw-r--r-- 1 493216 502216 11  5 oct 13:15 /home/webserver1/.local/share/containers/storage/volumes/websites/_data/9001/file-toto.html

Make sure the VirtualHost has an entry in your DNS or add an entry for it in /etc/hosts.

Go to http://virtualhostname.tld and it should disply the content of your file.
If your file is named index.html, you don’t have to specify it as it is the default file.

Good luck!


After you know the location of the directory, you can use WinSCP or something else to transfer files to it.
Make sure the owner-group of the files are correct.


The name of my NS8b2 for admin is:
For the VirtualHost I use:


Thank you Michel-André for the detailed guide!

The server FQDN cannot be used to define a virtual host. I guess LayLow wants to use the FQDN: how to make it possible?

Maybe the validator can be relaxed with the new Traefik release :man_shrugging:

ok got it however it is not a good things to use the FQDN of the server for a nginx vhost, we could remove it why not

Route priorities should be applied differently for it, as a special case. I can’t remember if Giacomo already implemented this exception…I will look at it tomorrow :wave:

1 Like

Exactly :slight_smile:

Bon soir Michel-André, et merci beaucoup pour votre aide détaillée.

Following the thread, it seems there are a few more cavecats…

Salut @schulzstefan,

Which ones?

If you want a CMS like WordPress, you will need to install MariaDB (which include phpMyAdmin).
WordPress and DokuWiki work like a charm on NS8b2, but, those are other stories…


No, it’s more about this

and the question, how to take care for the initial install… or migration.

Hello @LayLow

Just a question of a curious guy

When I buy a domain to my registar provider I think I could make 2000 subdomains on it. I try to set subdomain I could recall for my VM/hypervisor like Sometimes i put a bit of time to think on it

What I cannot catch is why you want to have an apache vhost whith the name of your VM even if from a technical point of view it could be possible

Why to simply not go to your provider and set another sub.domain and use it for your website, it will be nicer and fitted to your need

It’s just a guess: out of historical reasons. If a domain name is established for years, why changing it?

Yesterday, today and tomorrow are three different days, so you might don’t know all the needs you had yesterday.
However, you can think about your needs of today, and take decisions for tomorrow needs based educated guesses, common sense and (last but not least) Murphy’s law.
Like use a CNAME record for publicly shared services, masking the FDQN.

Hi @stephdl , so maybe you can tell me how to establish a basic website on the main domain e.g. my, you know where on ns7 you get the NS7 promo page.

ok you want once I created a virtualhost I could use it with a landing page advertising that I am on a NS8 virtualhost. Honestly I prefer to mask the product name that is running the vhost for a security point of view. This principle has been used during a long time with SME Server.
Why to help someone that want to hack your system where to search a flaw. However from a commercial point of view I understand your NFR and issue

well let’s say you have bought

you have installed a server called server and you put a subdomain

you can use as the virtualhost of your website, or another that fits better your needs

we could relax the validator but I am not sure it will be a good practice.

1 Like

Some random thoughts:

  1. Using the FQDN as HTTP route: I can agree it is not a beautiful practice, but it is what we used to do with NS6 and NS7, so I think it is a legitimate use case request.

  2. The server FQDN is already registered in the DNS, some applications use path routes like /cluster-admin /rspamd /sftpgo for configuration/admin interfaces. If such routes are preserved, why not using the FQDN also for something else?

  3. IMO, a fallback 403 splash page is not a security (through obscurity) issue, instead it is what we have in NS7. In practice, the splash page can be served by the cluster-admin backend. It is not a big priority but just a NFR to put in a wishlist…