0

I have been trying this for hours and am getting pretty frustrated. I am trying to use a ReadyNAS Pro as a webserver. It uses Apache for its web interface. I would like to use that interface when I address the device via IP address, but I also have my domain name pointing to it. When I use my domain name I want it to display my website (with wildcards for the website's pages). I have tried using mod-rewrite without much success. It seems to break the ReadyNAS web interface. I have tried adding a named virtual host, but I don't have much experience with that and I don't know what I should use as a default virtual host to address my machine by IP. I have tried moving the ReadyNAS web interface to a sub-folder of the Apache Root, but that seems to break the web interface also.

It should be noted, that while I could create a subdomain for the web interface, I would rather address it by my machine's local IP only so it isn't visible to the outside world. While there are some simple tutorials of setting up a website on the ReadyNAS they use the ReadyNAS share system that appends a folder name to your url i.e. domain.com/www/. This is just no good.

Long story short, I want to host my website using my domain on my ReadyNAS (no sub-folders). I want to continue using the ReadyNAS web interface, but only from my local network. I do NOT want to run a second web server. I do NOT want to wipe the original OS (proprietary hardware/drivers are used for intelligent power management)

For reference it is a ReadyNAS Ultra 4+ with ReadyNAS default OS (Debian Etch).

P.S. Don't tell me this isn't what a NAS is for, I am aware and I don't care nor want to hear you cry about it.

user1697999
  • 215
  • 3
  • 10

1 Answers1

1

If I did understand correctly you would like to access your own site with address like mydomain.home not mydomain.home/www I have achieved this with following config by using ReadyNas Duo

First modify Virtual.conf file from

<VirtualHost _default_:80>

to

NameVirtualHost *:80
<VirtualHost *:80>

Now you can add new virtual host config file under the addons directory ie. mydomain.conf

<VirtualHost *:80>
    ServerName mydomain.home
    DocumentRoot /var/www/mydomain.home
    <Directory /var/www/mydomain.home>
        Options Indexed
        Order allow,deny
        Allow from all
    </Directory>
    SSLEngine off
</VirtualHost>

Here is link for the original post that I did follow https://liewdaryl.wordpress.com/page/2/

I did add NameVirtualHost definition so apache would not warn about overlapping virtualhost definitions

Timii
  • 234
  • 4
  • 11