|
|
#1 |
|
Fanatic Member
Join Date: Jul 02
Location: Canada
Posts: 655
![]() |
Greetings people...
First off, sorry if this is in the wrong section, but I couldn't figure where to put my thread, move if needed... I just bought a domain of one & one (great deal 7$ domain)... and I don't think you can enable a wildcard (*.mydomain.com) through them... which I usually used with apache. I used my sub-domains for user webpages, they have full access to their root, but they have access denial to anything else... apache config: Code:
<VirtualHost *> DocumentRoot d:/web/member/USERXXXXXXXX ServerName USERXXXXXXXX.mydomain.com User USERXXXXXXXX Group MYGROUP_FTP php_admin_value open_basedir "z:/web/member/USERXXXXXXXX" </VirtualHost> My question is this how can I lock them to a folder... instead of a domain? let's say I do a virtual directory of mydomain.com/member/USERXXXXXXXX how can he be locked to z:\web\member\USERXXXXXXXX? (I'd need to change "ServerName USERXXXXXXXX.mydomain.com" by something that gets a folder instead of a domain) Thanks in advance to break out your heads for me...!!!!!
__________________
Using VB.NET 2005/.NET 2.0, NetBeans IDE 5, Fujitsu Cobol85, Website: http://DreamForgery.com Last edited by Ruku; Apr 27th, 2006 at 07:25 PM. |
|
|
|
|
|
#2 |
|
Fanatic Member
Join Date: Jul 02
Location: Canada
Posts: 655
![]() |
Re: Apache chroot question...
*bump*
A friend of mine showed me "htaccess" methods in the apache config file... what htaccess does is simple, it gives read/write permissions over the directories you have within apache (real or virtual). However, the problem is that all users would have read access to my main .php files, which is a problem. I really need to chroot the folder, so that the php files within the folder don't have access to anywhere else than within the folder... my brain is still going on this... any help, any at all?
__________________
Using VB.NET 2005/.NET 2.0, NetBeans IDE 5, Fujitsu Cobol85, Website: http://DreamForgery.com Last edited by Ruku; Apr 19th, 2006 at 02:46 PM. |
|
|
|
|
|
#3 |
|
Super Moderator
Join Date: Jan 05
Location: Sunny Adelaide
Posts: 12,532
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Re: Apache chroot question... [Unresolved]
Change permissions either through an FTP client or your hosting software such as Cpanel or DirectAdmin, both have file system tools.
|
|
|
|
|
|
#4 |
|
Fanatic Member
Join Date: Jul 02
Location: Canada
Posts: 655
![]() |
Re: Apache chroot question... [Unresolved]
All the permissions are already set...
What I'm looking for is a way to login the user locked under the permissions over a specific folder, which would be his root... (I don't need 1 general user account, I need to chroot all users individually) how do I do that through apache config?
__________________
Using VB.NET 2005/.NET 2.0, NetBeans IDE 5, Fujitsu Cobol85, Website: http://DreamForgery.com |
|
|
|
|
|
#5 |
|
Swine Buddy
Join Date: Apr 02
Location: Langley, Berks, UK Mode: Restructuring
Posts: 4,784
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Re: Apache chroot question... [Unresolved]
The only way you can croot PHP is to have it start as root, carry out the chroot and demote itsself to the user you want to run it as. There are programs that do this for you, such as suexec. To do this you need to have PHP run as a CGI not a web server module.
Another method you can use is the powerful URL rewriting module in Apache. A request to http://www.example.com/user/ gets rewritten to http://user.example.com/ (you can then have a name server running on the server which resolves unknown .example.com addresses to the IP address of the server).
__________________
PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2 | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am. Random VisualAd: Spread happiness and joy. Rate good posts.
|
|
|
|
|
|
#6 |
|
Swine Buddy
Join Date: Apr 02
Location: Langley, Berks, UK Mode: Restructuring
Posts: 4,784
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Re: Apache chroot question... [Unresolved]
Take a look at this: http://httpd.apache.org/docs/1.3/misc/rewriteguide.html
__________________
PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2 | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am. Random VisualAd: Spread happiness and joy. Rate good posts.
|
|
|
|
|
|
#7 | |
|
Fanatic Member
Join Date: Jul 02
Location: Canada
Posts: 655
![]() |
Re: Apache chroot question... [Unresolved]
Quote:
mydomain.com/member/member1 (limited subdomains, no wildcard, but .com) to member1.mydomain.gotdns.com (wildcard, but .gotdns.com) it still has the ugly gotdns part... but it's better than nothin'...! !
__________________
Using VB.NET 2005/.NET 2.0, NetBeans IDE 5, Fujitsu Cobol85, Website: http://DreamForgery.com |
|
|
|
|
![]() |
|
||||||
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|