Moving from SME Server and problems with virtual host


(Alessio Fattorini) #1

Continuing the discussion from So, what are you working on? - 28 Nov 17:


So, what are you working on? - 28 Nov 17
(Stéphane de Labrusse) #2

have you checked the checkbox ‘Root directory file listings’ in the virtualhost panel ?

Nice to see you there…


(Laurent) #3

Nice to see you too Stephane!

I didn’t check it, and after change it’s the same.


(Stéphane de Labrusse) #4

what is the url you used, what is your network configuration, does the nethserver is your gateway ?


(Stéphane de Labrusse) #5

this is how I do, workable by default. In the /etc/hosts of my (remote) laptop I put

192.168.12.174 domain.com #adapt to the url of your NS

then in firefox put the url : domain.com


(Laurent) #6

The host is here: vps1.mail2voice.org
the virtual host is : board.mail2voice.org (it’s a subdomain)

Network: I’ve just 1 NIC, DHCP, green
The NS is the gateway.


(Laurent) #7

Who is the owner of the files? For me it’s ‘ftp’.
Must I create a ‘html’ directory?
When I put a blank file ‘index.html’, I stay on the NS welcome page.

My hosts file is good:
XX.XX.XX.XX vps1.mail2voice.org vps1 board.mail2voice.org


(Stéphane de Labrusse) #8
  • check the /etc/hosts of the server you must find the server name and also board.mail2voice.org
  • verify that ‘dig any board.mail2voice.org’ in your server and on your laptop gives you the dns record (the ip of your server)

recreate another vhost and check the logs and any error in

/var/log/messages
/var/log/httpd/access_log
/var/log/httpd/error_log

(Laurent) #9

Thank you!
I found an error in httpd/error_log:
[Mon Dec 04 09:44:52.099171 2017] [rewrite:error] [pid 2498] [client XX.XX.XX.XX:43252] AH00670: Options FollowSymLinks and SymLinksIfOwnerMatch are both off, so the RewriteRule directive is also forbidden due to its similar ability to circumvent directory restrictions : /var/lib/nethserver/vhost/board/

Yes… I have a .htaccess file! My bad, I didn’t think it before.
When I rename this file I can see the good website. So NS is ok!
But I need this feature, I have to learn more about rewriting…

[edit:]
It’s ok, I’ve just add this line in the .htaccess and all is OK:
Options -MultiViews


(Stéphane de Labrusse) #10

Laurent I set your post as the solution of your thread, Happy that NS can fit your need :slight_smile:

I know that you are the speaker of a smart project at ‘capitole du Libre’, I was not at your talk, you should start a thread one day and present it.


So, here's what I'm working on ;)
(Laurent) #11

Thank you for your help and your welcome here!

Yes I’m the holder of the Mail2Voice project. It’s a FOSS, a client mail for persons with special needs (illiteracy, motor handicap, cognitive handicap, DYS).

Let me some time for discover it a little more, and perhaps I’ll present how NethServer help us in this project.


(Alessio Fattorini) #12

I’m curious, pleas do it as soon as possible :slight_smile:


(Laurent) #13

I’ve just post my presentation: So, here’s what I’m working on ;)

:wink: