I really would like this web server module. So some questions to the Unix-literate audience ....
In my view, the N2200 already has a web server module that drives the admin and Web Disk access (e.g. /img/www/htdocs/adm/index.php). So why install another web server? Presume the question then is how to move ones own files correctly there?
With the "tools"/"knowledge" that I have so far, creating entries there is painful, e.g. e.g. /img/www/htdocs/MyAlbum.
Is there a way under Unix to extend/continue/link (via permanent path) the directory /img/www/htdocs to, for example, /raid/data/MyWWW - with MyWWW being a user folder that I created from the Storage Management module - and that then would be a location/folder that I could easily manage/maintain from the Web Disk and/or upload from FTP?
yes, it is easy to create a symbolic link... make sure you have a directory existing first, example:
Then create a link to it (assuming MyAlbum does not yet exist):
ln -s /raid/data/myWWW /img/www/htdocs/MyAlbum
see what it looks like with:
ls -l /img/www/htdocs/
You may need to change the owner, group or mode, or it may work as is.
It is worth understanding the output of the long listing, plenty of websites for this, in short: drwxrwxrwx apple fruit mydirectory means "directory", user "apple" has permissions read-write-execute, same with group "fruit" and other. a minus sign means missing permission.
If you want to avoid having to use the "ln" command all the time, you could setup one web page where you choose which folder to link or unlink. This could look like a simplified version of the Thecus page to manage share folders.
To remove a link, use "rm" the same way as for a file, for example:
Another scenario is to link to particular html files instead of folders, but this would be even more fiddly in my opinion.
What I found out so far - The N2200 runs an Apache web server. - The configuration file is /etc/httpd/conf/httpd.conf - The control module is /opt/apache/bin/apachectl
Some system folders are symlinked, e.g. htdocs --> /img/www/htdocs - So if the Apache server looks for the web site it goes into /img/www/htdocs (where it finds the Thecus web site for admin/web disk/photos).
What I would like to do is chain folder /img/www/htdocs (Thecus controlled) with folder /raid/data/MyWWW (user controlled). This link should be permanent (still exist after reboot of the N2200.
Then if the N2200 Apache server looks for a web site it will either find it in /img/www/htdocs or /raid/data/MyWWW.
It would be great if in the same way you've got a script for FTP in your wiki you could add a script that creates MyWWW and adds the permanent symlink then the N2200 would be ready to be used as your web server.
One issue I currently try resolving is how to protect the web site: Apache web server uses .htaccess & .htpasswd files. The mechanism is present in the N2200 web server but fails. I have some suspicion but I am not yet at the bottom of it. I'll be a happy man once .htaccss works because then I'd have all I wanted, and I would prefer it over the N2100 web server module. I do not care about integration with NAS user accounts, all I need is standard Apache behaviour (and my web site users would be other users than my NAS users anyway so I don't care about maintaining an extra Apache .htpasswd file).
Yes, the admin tool is very slow, something I have not investigated because after all, admin functions I only do so and so often and therefore I can live with this inconvenience. As said, I have not investigated but my uninformed suspicion is that the slow performance may come from this ajax interface.
My main use case for the NAS is network storage and the performance with my network folders is acceptable. I have not measured it objectively but my feeling is that my desktop copies files to the NAS a little bit slower than copying to a USB disk. My main environment is XP & gigabit router.
My other desired use case is to use this NAS as a web server to share recent photos with the family without having to email those photos around - I want to provide them from a central place where I can add comments and presentation. [Btw, my preference is using Jalbum over the Thecus chosen module because Jalbum is very easy to use giving top results and I can prepare & preview it totally outside the NAS, i.e. am not hampered by the NAS' UI performance]
Inspecting the NAS with ROOTCMD tool told me that it uses a Apache v2.2 web server. Apache is the state-of-art web server and very well documented on the Internet (no need for documentation from Thecus).
From the posts you saw that I introduced my own website to the N2200 Apache and I was happy with the performance. I did not test over the Internet but think that rather the ISP upload will be a bottleneck than the NAS hw/Apache performance.
So far, so good. Unfortunately the Thecus "integration" of the Apache is a bit strange. In the config file they allow .htaccess for authentication but the object module that therefore is required is missing in the /modules directory. Personally, I would like to use this standard Apache functionality - especially for security matters - however, a workaround would be to add a php script. Php is enabled and the N2200 uses it heavily.
The other point, I would like to use my own web server subdirectory and not mess around in the NAS system directories. The standard Apache configuration allows for this (see virtualhost directive). I would like to use virtualhost for (a) my own directory, e.g. MyWWW/htdocs and (b) using a different port number than the one by the NAS UI - this would allow port forwarding to my website only and not expose the NAS GUI with admin and local user accounts (that may hold weak passwords because hey - why go mad with passwords within the family LAN?) Unfortunately, again Thecus have omitted the Apache module for virtualhost so I cannot use standard functionality. So my workaround is this symbolic link from the Thecus /htdocs directory to my website.
In conclusion, the basic means are available: Apache web server, workaround for basic authentication, workaround for placing the own website in a user directory. However, my preference was using standard Apache functionality and I am disappointed by Thecus because it would take their Apache specialist less than 15 minutes to provide this N200 pre-configured with virtual host from a user directory giving us the power tapping into a standard Apache server for our own use.
Then on the system prompt: - validate the syntax: /opt/apache/bin/apachectl configtest - restart the webserver: /opt/apache/bin/apachectl graceful
In the webbrowser: http://<NAS IP address>:8080 goes to /raid/data/MyWWW/htdocs/index.html http://<NAS IP address>:8080/Flowers goes to /raid/data/MyWWW/htdocs/Flowers/index.html and so on and so on.
Notes of caution/comments: - On my NAS it works and has not broken anything but I have not fully validated it. - The virtual host definition should go into seperate definition file so that it does not get wiped off by upgrades (at least that's the theory) - There is a lot of information about virtual hosts on the Internet. Enjoy googling and refining. - I liked the port-based virtual host because it allows selective port forwarding on the router. If you want to keep standard port 80 for external access you could easily switch the ports around and for example use 8080 for the admin. - For access control / authentication use php.
PS I have installed ROOTCMD and DROPBEAR/SSH but only used ROOTCMD for above. I copied the httpd.conf file to MyWWW, (shame on me) edited it under wordpad, and then copied it back into its place :-). The MyWWW folder I created from the NAS Storage management module.
The N2200 runs an Apache 2.2 (+php). The vhost configuration creates your instance that is served from your user directory, i.e. allows easy (*) publishing of (basic) content.
* can mean painful if you do not want to deal with (html) web authoring, and configuration & integration.
I only tested up to php script for authentication but for the moment I do not see a reason why you cannot do whatever you want (if you stay within system constraints), e.g. php-based wiki or web forum - why not? Of course you cannot have x k concurrent users but who would do that on a ~150 Euro box with 128MB RAM?
An initial "constraint" for me was that mod_auth object module was not available, meaning .htaccess with .htpasswd does not work. The workaround I did for myself was php script, and complementary, in case I wanted more configured ssl mutual authentication. In some time I plan updating the MyWWW wiki for this (and some refinements).
Btw, any missing modules you could build yourself. I downloaded the GPL kit and managed to rebuild Apache with the missing object files (despite being a beginner in UNIX and Apache **). I did not set up the ARM tool chain but saw some posts about how this is done and think it could be sorted, too, if need there is.
** because of this my configuration should be seen as a starting point only - the configuratin contains room for improvement & evolution.