Moving from SME Server and problems with virtual host

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

have you checked the checkbox ā€˜Root directory file listingsā€™ in the virtualhost panel ?

Nice to see you thereā€¦

Nice to see you too Stephane!

I didnā€™t check it, and after change itā€™s the same.

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

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

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.

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

  • 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

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

4 Likes

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.

1 Like

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.

4 Likes

Iā€™m curious, pleas do it as soon as possible :slight_smile:

1 Like

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

:wink:

2 Likes