Hi all,
I've just setup my Raspberry Pi running Cherokee through a No-IP host. It's
working great but I have a friend who's interested in learning a bit of web
development and I thought I'd give him some space on my Pi to play around
with. What I want is for him to have his own subdirectory that he can mess
around in but that won't affect the rest of my server if he does something
wrong. I've given his user no permissions outside of his directory except
for an SSH login.
I was wondering if it's possible to do this:
the default virtual server is hosted from /home/pi/www
I've set him up a user at /home/james with his own /www folder.
I then want for example [host].no-ip.org served from /home/pi/www
and [host].no-ip.org/james where the document root is served from
/home/james/www
I've tried two possible solutions but both have their own problems.
First I tied using a new directory rule within the default virtual server
which pointed /james to the document root /home/james/www. I also added a
second PHP extension rule. This works with html files but php files try to
download rather than get served.
If I change the rule priority so his php rule is on top and final then his
index.php is served at [host].no-ip.org but none of the other files in his
directory are accessible (returning 404) and in /james the files return a
405. I can still access my non-index.php files in my directory.
The second thing I tried was setting up at least one virtual server with
nickname [host].no-ip.org/james but with this setup everything returns 404.
*To summarise I want [host].no-ip.org to serve from /home/pi/www and [host].
no-ip.org/james to serve from /home/james/www both with PHP support.
*
Has anyone got any suggestions for making this work?
Thanks,
Derwent
I've just setup my Raspberry Pi running Cherokee through a No-IP host. It's
working great but I have a friend who's interested in learning a bit of web
development and I thought I'd give him some space on my Pi to play around
with. What I want is for him to have his own subdirectory that he can mess
around in but that won't affect the rest of my server if he does something
wrong. I've given his user no permissions outside of his directory except
for an SSH login.
I was wondering if it's possible to do this:
the default virtual server is hosted from /home/pi/www
I've set him up a user at /home/james with his own /www folder.
I then want for example [host].no-ip.org served from /home/pi/www
and [host].no-ip.org/james where the document root is served from
/home/james/www
I've tried two possible solutions but both have their own problems.
First I tied using a new directory rule within the default virtual server
which pointed /james to the document root /home/james/www. I also added a
second PHP extension rule. This works with html files but php files try to
download rather than get served.
If I change the rule priority so his php rule is on top and final then his
index.php is served at [host].no-ip.org but none of the other files in his
directory are accessible (returning 404) and in /james the files return a
405. I can still access my non-index.php files in my directory.
The second thing I tried was setting up at least one virtual server with
nickname [host].no-ip.org/james but with this setup everything returns 404.
*To summarise I want [host].no-ip.org to serve from /home/pi/www and [host].
no-ip.org/james to serve from /home/james/www both with PHP support.
*
Has anyone got any suggestions for making this work?
Thanks,
Derwent