Removing default webpage

NethServer Version: Latest
Module: VirtualHosts

Hey

Fairly new user here so sorry if I’m asking a whole lot of stupid questions but it seems that my mad googling skills can’t help me always so I need to ask here…

Basically I don’t want to see the default page (the nethserver_index.html one) when I enter my domain name.
Installing a web server helped a little because going to www.domain.com points to correct webpage now. But navigating to domain.com still shows the default page. How can I change that?

I have tried making a custom template and disabling the default page but it displays an error even though it should work (and I also doubt that it would change things):

root@mail /]# expand-template /etc/e-smith/templates-custom/etc/httpd/conf.d/welcome.conf
ERROR: Could not expand //etc/e-smith/templates-custom/etc/httpd/conf.d/welcome.conf template - it is a directory
at /sbin/e-smith/expand-template line 45.

[root@mail /]# ls /etc/e-smith/templates-custom/etc/httpd/conf.d/welcome.conf
10base

I have made a redirect on /usr/share/httpd/noindex/nethserver_index.html but that’s a quick and dirty hack.

How can I make my server point domain.com and www.domain.com in the same place?
www works and the one without doesn’t. DNS records at my DNS provider both point to the same IP and I have made an entry under DNS/Server Alias for both domain.com as well as www.domain.com.

Thanks for the help
Blaz

1 Like

Never mind. I’m dumb.

For anyone with the same problem. It was only a matter of adding another domain name under FQDN.
Basically what I had was www.domain.com and I had to add domain.com so that my FQDN looked like www.domain.com,domain.com.

Stupid me :slight_smile:

IIRC also dropping a /var/www/html/index.html file overrides the default splash page!

All questions are welcome! In general it is useful to everyone here if the question comes with the reasons behind it: why…? What’s the goal?

But you did it pretty well :wink: so thanks!

1 Like

Well I hate forum posts where I stumble upon an answer I need and the original poster only responds to himself as “doesn’t matter. Fixed it!”. That’s why I always add to my posts so that another user can try the same thing I did and see if it helps.

As for the reasons behind it: Why? What’s the goal?
I like the original page as a starting point for the first time that the server is configured but I prefer people to not see this page as they know exactly what system my server runs on (even if it is a virtual instance on this particular server) and can discover it’s possible flaws as well as admin page (even if it is protected).

Call me paranoid but that’s just the way I am.

4 Likes

It would be useful for others to share our “paranoid” hardenings :wink:

As a starter:

  • change SSH port and disable password auth
  • limit server-manager (httpd-admin) to LAN/green or localhost (ssh tunnel is enough)
  • touch /var/www/html/index.html

I have one better. :wink:

  • SSH is disabled unless needed. Otherwise it’s under a firewall (I use VPN if I need it)
  • Server manager (same as SSH only without the disabled part)

SSH is sure as a VPN, as long as you use key auth

True but I’m already running VPN on my server so I’ll stick with it.

1 Like