NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
wormhole1
Feb 15, 2013Aspirant
Ftp access to subfolders or http redirect to multiple shares
Hello, I have a shared folder "websites" in which I have 3 subfolders, each hosting a website for a different user. My problem is I need ftp access to each subfolder to be limited to each user. In...
Sandshark
Feb 23, 2013Sensei - Experienced User
Each site can be in its own share. In the above example, "Site1" is a share. Creating a similar entry (another entry in the same .conf file or another .conf file) for another share and another port will create a separate site for that share/port. So, yes, just set up the other share in FrontView the way you want to and then add the .conf via SSH that defines the website. You can even have different sub-domains in separate shares if you set up the rewrite rules correctly. What FrontView calls a "Share" is just an alias to a directory.
There are ways to create all the sites with the same port and differentiate the share based on the domain name, but I've not done it. I don't think you can have more than one .conf file in that case, though. You cerainly shouldn't define the default virtual host more than once. Since I have a dynamic IP address and need re-directs for each domain name anyway, it's just easier for me to have each site re-direct to a different port. I have seen an example in the forum on how to do that (but I did a quick search and didn't find it right off), and I'm sure you can Google and get some examples as well since that's really the more normal way of doing it on a platform that's designed for web sites rather than a NAS. If you are looking at non ReadyNAS specific examples, just remember that you can refer to a share by it's share name (i.e "ShareName"), or it's home directory (i.e. "/c/ShareName"). The share name aliases are defined in Shares.conf, located in /etc/frontview/apache (where all the other standard Apache .conf files are located). I'm not sure of the order of execution of the various .conf files, but it seems pretty clear that httpd.conf has to go first, then Shares.conf, then Virtual.conf. Don't know about the others, but you shouldn't really be messing with them, anyway. You will have to make sure any reference to an alias is after Shares.conf is executed. If you just keep things in the files where similar FrontView entries already occur, you should be OK. If using a share name doesn't seem to work, use the directory name instead. The addons directory below the apache directory is where you would put any custom .conf files, as every .conf file in it is run after the standard .conf files, which is another reason for putting everything in there. Since it truly executes every .conf, make sure you've deleted any files you don't want run or re-name them so they don't end in .conf.
You can either edit files within the NAS LINUX environment (where VI is the only editor installed by default) or copy them to another share and edit them outside. If you do copy them, you'll need to change permissions to edit them. I've always made sure the ones I put in the apache directories have "root" as the owner. It may not be necessary, but it's best, so be sure to change that back if you edit with credentials other than "root". My old NV was particular about .conf files having only LF end-of-line instead of CRLF, but the Pro seems not to care. Don't know if later firmwares on the SPARC platforms also make it tollerant to a CRLF EOL. Never had an ARM based NAS, so know nothing about their restrictions. So, you may need to be careful with the editor you choose if you are editing outside of the LINUX environment. I like UltraEdit for this.
If you are going to use Port 80, then you are either going to have to disable HTTP access to ALL shares in FrontView or you are going to have to edit the standard .conf files and potentially re-edit every time you make a change in FrontView that affects HTTP access. Letting FrontView make changes to .conf files that affect port 80 and having your own separate files that may be contradictory could have some unsavory results. Using alternate ports that FrontView knows nothing about makes all this unnecessary.
There are ways to create all the sites with the same port and differentiate the share based on the domain name, but I've not done it. I don't think you can have more than one .conf file in that case, though. You cerainly shouldn't define the default virtual host more than once. Since I have a dynamic IP address and need re-directs for each domain name anyway, it's just easier for me to have each site re-direct to a different port. I have seen an example in the forum on how to do that (but I did a quick search and didn't find it right off), and I'm sure you can Google and get some examples as well since that's really the more normal way of doing it on a platform that's designed for web sites rather than a NAS. If you are looking at non ReadyNAS specific examples, just remember that you can refer to a share by it's share name (i.e "ShareName"), or it's home directory (i.e. "/c/ShareName"). The share name aliases are defined in Shares.conf, located in /etc/frontview/apache (where all the other standard Apache .conf files are located). I'm not sure of the order of execution of the various .conf files, but it seems pretty clear that httpd.conf has to go first, then Shares.conf, then Virtual.conf. Don't know about the others, but you shouldn't really be messing with them, anyway. You will have to make sure any reference to an alias is after Shares.conf is executed. If you just keep things in the files where similar FrontView entries already occur, you should be OK. If using a share name doesn't seem to work, use the directory name instead. The addons directory below the apache directory is where you would put any custom .conf files, as every .conf file in it is run after the standard .conf files, which is another reason for putting everything in there. Since it truly executes every .conf, make sure you've deleted any files you don't want run or re-name them so they don't end in .conf.
You can either edit files within the NAS LINUX environment (where VI is the only editor installed by default) or copy them to another share and edit them outside. If you do copy them, you'll need to change permissions to edit them. I've always made sure the ones I put in the apache directories have "root" as the owner. It may not be necessary, but it's best, so be sure to change that back if you edit with credentials other than "root". My old NV was particular about .conf files having only LF end-of-line instead of CRLF, but the Pro seems not to care. Don't know if later firmwares on the SPARC platforms also make it tollerant to a CRLF EOL. Never had an ARM based NAS, so know nothing about their restrictions. So, you may need to be careful with the editor you choose if you are editing outside of the LINUX environment. I like UltraEdit for this.
If you are going to use Port 80, then you are either going to have to disable HTTP access to ALL shares in FrontView or you are going to have to edit the standard .conf files and potentially re-edit every time you make a change in FrontView that affects HTTP access. Letting FrontView make changes to .conf files that affect port 80 and having your own separate files that may be contradictory could have some unsavory results. Using alternate ports that FrontView knows nothing about makes all this unnecessary.
Related Content
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!