Web server & virtualhost can use a different location for the site files?

webserver

(Enrique D) #1

NethServer Version: 7.6.1810 (final)
Module: web server & virtualhosts

Is possible to use a shared folder for the virtualhost site?, the shared folder in other location on the server.

The virtualhost is located in:
/var/lib/nethserver/vhost/erp

The shared folder location is:
/var/lib/nethserver/ibay/erpaccesall/

I need this because the site need to have a double usage:

  • serve the html files
  • allow the access of some files for a reporting tool

With this approach I can edit at will the html files and the report files in the same location (shared folder) and the site can be managed without ftp uploads.

The shared folder is read only for the users and just the admins have write access to all.
Regards


(Federico Ballarini) #2

No. With Nethserver 7 you can’t use a shared folders as Virtual Host (only in Nethserver 6).
You can think to crate a symbolic link from /var/www/html folder to your ibay (test it, I don’t know if it works) and publish your html files.

To create symbolic link use this command
ln -sf /var/lib/nethserver/ibay/folder /var/www/html/nameoflink

Then you can browse it with https://yourserveraddress/nameofthelink and upload/manage files from Samba folders.


(Enrique D) #3

Thank you,
The symlink works for /var/www/html, It creates a new level to get it done but I can live with that.
http://ads/ -> http://ads/erp/menu.htm