NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
devbobo
Nov 29, 2009Aspirant
HOW TO: Hosting multiple websites
G'day Guys, For some time I've wanted to host multiple websites from a single ReadyNAS unit...I haven't had the time to investigate it. 1. Backup all the .conf files in /etc/frontview/apache 2....
leoj3n
Jul 15, 2012Aspirant
Stefan (WhoCares?) helped me privately and we got it sorted. I posted the critical factor here: viewtopic.php?f=35&t=64537
Here's my final config, it should be useful to anyone else trying to set up virtual hosts + PHP (& I've included an example that fixes directory images): http://leoj3n.otzo.com/example-apache-a ... fig.tar.gz
Important files:
Here are the steps the I believe resulted in my eventual success:
First, backup your current configuration
Change settings in FrontView -> Standard File Protocols -> HTTP
Redirect default web access to this share: None selected
Login authentication on this share: Disable
Clone WhoCares?'s apache-configs repo on Gitorious
Link: https://gitorious.org/readynas/apache-configs
Git clone command:
Run the apache-configs install file
Create a .vhost file in /etc/frontview/apache/addons/
The contents of YOUR.DOMAIN.com.vhost should be something like:
Restart Apache
Here's my final config, it should be useful to anyone else trying to set up virtual hosts + PHP (& I've included an example that fixes directory images): http://leoj3n.otzo.com/example-apache-a ... fig.tar.gz
Important files:
/etc/frontview/apache/addons/sub.domain.com.vhost #example virtual host
/etc/frontview/apache/addons/dirlist.domain.com.vhost #example virtual host that supports directory images
/etc/frontview/apache/addons/domain.com.vhost #example virtual host that utilizes ServerAlias
/etc/frontview/apache/addons/00_php5module.conf #php5 config file; without this .php files download instead of output to the browser
Here are the steps the I believe resulted in my eventual success:
First, backup your current configuration
cp -rf /etc/frontview/apache/ /etc/frontview/apache.bak/
Change settings in FrontView -> Standard File Protocols -> HTTP
Redirect default web access to this share: None selected
Login authentication on this share: Disable
Clone WhoCares?'s apache-configs repo on Gitorious
Link: https://gitorious.org/readynas/apache-configs
Git clone command:
git clone git://gitorious.org/readynas/apache-configs.git apache-configs
Run the apache-configs install file
cd ./apache-configs/; sudo bash install.sh
Create a .vhost file in /etc/frontview/apache/addons/
cd /etc/frontview/apache/addons/; touch YOUR.DOMAIN.com.vhost
The contents of YOUR.DOMAIN.com.vhost should be something like:
<VirtualHost *:80>
ServerName YOUR.DOMAIN.com
DocumentRoot /YOUR_HTML_SHARE/a_sub_dir
<Directory /YOUR_HTML_SHARE/a_sub_dir>
Options +FollowSymLinks +ExecCGI
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>
DirectoryIndex redirect.html index.html index.htm index.php
<Location /index.html>
SetHandler none
Order Allow,Deny
Allow from all
</Location>
SSLEngine off
RewriteEngine On
RewriteOptions Inherit
Options +FollowSymLinks
</VirtualHost>
Restart Apache
apache-ssl -f /etc/frontview/apache/httpd.conf -k restart
Related Content
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!