Basic web hosting on the ReadyNAS is simple and can be done via frontview. The problem with it is that it allows indexing which is a security flaw and it messes up your URL with a suffix (ie:something.com/website)
To solve this problem, we have to dwell into Apache2’s config files or install another web server (ie: lighttpd). However, 2 processes can’t share the same port which could lead to more configuration nightmare.
As we know, ReadyNAS Ultra already came with Apache2 installed. It has a preconfigured Virtual.conf. Modifying of the preconfigured files are usually not recommended since it a firmware upgrade/reinstall or even reconfiguring certain settings in from frontview would revert the file back to its original settings. Fortunately, we could make use of the included addons folder.
But first, we have to modify the Virtual.conf by removing the catch all “_default_” tag with an “*”
<VirtualHost _default_:80>
into
<VirtualHost *:80>
Next, we create a new .conf file (remember to set the permissions appropriately) in /etc/frontview/apache/addons
<VirtualHost *:80> ServerName www.example.com ServerAlias www.example2.com DocumentRoot /path/to/example.com <Directory /path/to/example.com> Options Indexes Order allow,deny Allow from all </Directory> SSLEngine off </VirtualHost>
The <Directory> code there disables indexes which is what I wanted and the ServerAlias is a good way to have multiple URL pointing at the same DocumentRoot without having to declare new VirtualHosts. This configuration of course could be used as many times in a single config file as you want as long as the ServerName and Aliases does not conflict each other.
Finally, do a quick Apache restart and we are in business.
Pingback: Enabling .htaccess on ReadyNAS Ultra 2 | My Scratchpad
Where is Virtual.conf???? Searching for it under OS6.1.7 results in no hits.
Hey Cale, not sure where Virtual.conf is under OS6 as I don’t have OS6 Installed on my box. Sorry unable to help you out