Nethserver version : 7.3.1611
Module : nethserver-virtualhosts
I’m playing with awstats and I find something strange, for now it is a support post, but It might be probably a bug
When you create a virtualhost by the panel, you cannot browse the content even it the ‘Options +Indexes’ is set in the relevant apache virtualhost setting(/etc/httpd/conf.d/virtualhosts.conf), the default nethserver welcome page is displayed.
In the log you can find an error
[Tue May 09 19:04:25.214037 2017] [autoindex:error] [pid 25066] [client 192.168.12.25:35836] AH01276: Cannot serve directory /var/lib/nethserver/vhost/toto.plop.com/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive
of course if you put an index.html in /var/lib/nethserver/vhosts/toto then your specific index.html is displayed, but In some case you want to display a list of files and folders, hence my interest.
If you want to do it, then you must remove the line in /etc/httpd/conf.d/welcome.conf
Don’t get me wrong, but you’re saying us the same thing M$ is telling us since ages…
“It’s not a bug, it’s an undocumented feature (even if it doesn’t work or doesn’t do what it’s expected to do)”
Steph is right… If something doesn’t work out of the box how it’s expected to work, it’s a bug… A coding one or a documentation one maybe, but still a bug
I’m not an expert in .htaccess, I do prefer to change the settings directly in apache…For what I know a .htaccess is the way to change some (not all) apache settings for less privileged users, so clearly it is a workaround but it doesn’t solve the root of the issue.
However thank to bring it up.
I don’t get the point to forbid all ‘+Indexes’ in the welcome.conf and to allow them in the VH configuration maybe you can en-light me. However I think that more apache directives worth a panel with check boxes…but really not a configuration file like a .htaccess.
I’m not an expert too, I constantly refer to apache docs and online forums!
I think I don’t catch what is the root of the issue… What do you mean?
First of all, welcome.conf is an upstream configuration file. I think its behavior is a good default for empty web sites. Moreover the virtual-host package is primarily for site hosting and no more intended for file sharing.
Most webapp tarballs come with an .htaccess configuration designed around upstream defaults. No need to write one (hopefully).
A custom .htaccess can be uploaded via FTP or SFTP. No shell programming is required.
Now, our UI is task oriented. IMO it’s hard to design a one-fit-all UI for the many Apache settings, the risk is programming a webmin-like interface. For this reason I’m not planning additional options for the UI at this moment.
However if we discover a common use case, good for the UI, we can surely discuss it!
Furthermore, if you like to develop an add-on UI I will be glad to help and improve the plugin support of this module!
simply to display the files/folders in the apache folder without a workaround…I saw many posts on this forum, people display the same welcome page for all Vhosts, until they put an index.html file (or install a web application)
did you think about the software repositories, you need to follow symlinks and display files/folders.
Still my opinion with a user case. I play in a linux user group and the documents that we make, are available in an apache directory that we populate by ftp. It is available to the whole word.