Very new to Nethserver need help understanding Vhost (Solved)

We recently setup a server and I will have to say the GUI web page is amazing!! However I have multiple websites that will at times require FTP for updates etc… where and how do set this up safely… do I just start creating random folders under /var/www and tell Apache??

I guess I have read some articles here…

However after following the directions have wound up as both sites being the same…

Example lorentedford.com shows content of kc9zhv.com kinda odd…

I would have figured that since most of this system is in a gui the web vhost would be in a gui environment too…

This is the steps that got me back up and working… Still dealing with an mysql database issue I will have to later try converting my mysql files down to the older version…

Basic setup

Next ssh into server through the lan network.

important to ifconfig and figure out which network adapter is the internet

look to see which ethernet is selected for outbound traffic.
Then adjust the following commands accordingly.
route add gatewayip dev eth1
route add default gw gatewayip eth1

Next yum install nano

Now we add the lines above to startup below everything else.
nano /etc/rc.local
route add yourgatewayip dev eth1 <required for ovh if special ips assigned
route add default gw Yourgatewayip eth1 <required for ovh if special ips assigned

an example 10.10.10.254 <-gateway ip
Machine ip example 10.10.10.50

With OVH or So you start server you will need to to find the ip of the host machine… Typically the gateway will be the .254 of your ip if your with ovh.

Run yum update

Login into the pannel from the webside
https://networkip:980

Go to software center and install the packages…

To fix phpmyadmin-multi
run the following commands via ssh in a terminal.

yum install --enablerepo=nethforge nethserver-phpmyadmin
config show phpmyadmin

phpmyadmin=configuration
access=private
adminaccess=enabled
multiaccess=disabled
cat /etc/my.pwd

https://yourdomain/phpmyadmin-multi <— This works

if adminacces is enabled and multiaccess is enabled

config setprop phpmyadmin multiaccess enabled
signal-event nethserver-phpmyadmin-save

config setprop phpmyadmin access public
signal-event nethserver-phpmyadmin-save

cd /etc/httpd/conf.d
nano domainname.conf

##https://httpd.apache.org/docs/current/mod/core.html#virtualhost

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

If you’re a little brave, you could also test the new Virtual hosts module for NS 7 :wink:

1 Like

Well i am inside of a hyper-visor would make things a little more interesting…

I suppose one big issue is I am pretty well out of ips lol… Ran through 8 of them now…

Hi Loren, I’m glad to see you marked your request “solved” :smile:

I know on ns6 vitualhosts are messy and I hope we steered in a more comfortable way with ns7: please have a look at Virtual host page for ns7, too!

Just merged also the manual page from @Stll0

http://docs.nethserver.org/en/v7b/virtual_hosts.html

1 Like

wait i didn’t have to hard code the websites?

The Apache configuration on NethServer is designed to support both “hard-code” and UI-configured sites. Anyway the UI part on ns6 is mixed with the “Shared folder” concept and we improved it on ns7.

1 Like

4 posts were split to a new topic: Issue with phpmyadmin version

@lorentedford did you resolve? Please mark the topis as resolved