How can i HOST a web domain with nethserver?

I’ ve a domain on ovh but i don’t understand how to host this domain on nethserver. I installed nethserver on ovh vps and @Nas helped me. Now i need to host this domain, i used the Web interface and i tried to make a new host on DNS. How can i connect the domain with dns and with shared folder ?

Hi,

Install a CMS on your NethServer instance ( Wordpress, Joomla…)

And configure your domain zone with your registrar domain zone to point on your page.

If you want to host your mail, the NethServer instance must have the same domaine name, configure Sogo, and point the Mx on your NethServer instance.

1 Like

i’ ve got multiple domains and i need associate every domain with a differed shared file i dont know to do it

Maybe this Post helps you?

1 Like

so i may created a new file at /etc/httpd/conf.d that must have the ending .conf. like your ?
but my problem isnt that ive only one ip ive got multiple ips…

yes.
If you have the following:
Webserver1 = 10.100.0.100 (for domain mydomain.com and just-a-domain.com)
Webserver2 = 10.100.0.101 (for domain yourdomain.com)
Webserver3 = 10.100.0.102 (for domain herdomain.com)

You have to configure this in the file:

<VirtualHost *:80>    
	ServerName mydomain.com   
	ServerAlias just-a-domain.com www.mydomain.com www.just-a-domain.com
	ProxyPreserveHost On    
	ProxyPass / http://100.100.0.100/    
	ProxyPassReverse / http://100.100.0.100/
</VirtualHost>

<VirtualHost *:80>    
	ServerName yourdomain.com    
	ServerAlias www.yourdomain.com    
	ProxyPreserveHost On    
	ProxyPass / http://100.100.0.101/    
	ProxyPassReverse / http://100.100.0.101/
</VirtualHost>

<VirtualHost *:80>    
	ServerName herdomain.com    
	ServerAlias www.herdomain.com    
	ProxyPreserveHost On    
	ProxyPass / http://100.100.0.102/    
	ProxyPassReverse / http://100.100.0.102/
</VirtualHost>

You can also use Wildcards (*) for ServerName and ServerAlias. i.e. instead of www.mydomain.com you can write *.mydomain.com and all subdomains for this Domain will match the criteria and beeing redirected to the Server.
If you also want to use HTTPS, you also have to add the HTTPS-Part for each Server/Domain/Certificate.

1 Like

Done, now the file is created so what I have to do now? i’ ve got the domain

that’ s mydomain.it dns configuration

mydomain.it.	 	NS	vps.ovh.net.		
www.mydomain.it.	NS	vps.ovh.net.		
mydomain.it.	 	MX	1 redirect.ovh.net.		
www.mydomain.it.	MX	1 redirect.ovh.net.		
mydomain.it.    	A	94.23.67.98		
www.mydomain.it.	A	94.23.67.98		

That 94.23.67.98 is the ip written in mydomains.conf and an other is the vps ip

Is the dns configuration OK ?


So if the dns conf is ok and the file.conf is created WHAT I HAVE TO DO IN NS DNS ALIAS AND IN SHARED FOLDER


Maybe I missunderstood your infrastructure
do you have the Nethserver and one (or more) webserver or is the Nethserver your Webserver?

If the Nethserver is your Webserver, you don’t need a ReverseProxy, but a VirtualHost (configuration is nearly the same).
I don’t have a virtual host, so all I write now is from the Apache Documentation core - Apache HTTP Server Version 2.4
Forget about the stuff I wrote before. Use this snippet and replace mydomain.it with your domain and adjust the path to the DocumentRoot-Directory (i.e. where your index.php-File is).

<VirtualHost *:80>
   ServerName mydomain.it
   ServerAlias www.mydomain.it
   DocumentRoot /www/docs/mydomain.it
</VirtualHost>

After you configured this and executed the command
signal-event nethserver-httpd-update
in the console, you should be able to access your Webroot.
If I still misunderstood you, please draw a picture what your infrastructure is and which server is providing which service.

As far as I know: Nothing

1 Like