Jump to content

Archived

This topic is now archived and is closed to further replies.

tommy117

Manage Apache with PHP

Recommended Posts

Hi

I'd like to know how to create an Apache user-account with PHP (the idea was to create a folder and a user-account with rights on that folder so that a user (who registered on a PHP page) could use ftp to upload files to the server).

Also, is it possible to make a folder on Apache so that it could be accessed only by the owner and from the web (and by root)?

Share this post


Link to post
Share on other sites
No you dont need to make a account with apache all you do is download it and start making your folders. And yes there is a way by only accessing it on your own machine and thats by typing in http://localhost.

Share this post


Link to post
Share on other sites
In order to do this, you'll need to find ways to:

-Have PHP edit the httpd.config to add virtual hosts, directories and aliases for each user.
-Install an FTP service that can be access from the command line (batch file FTP).
-It sounds like you will need to use exec() to have PHP run processes on the command line for interfacing.

In this situation, it would be more practical to use .htaccess files to control access to directories which would be relatively simple.

All in all, this is too complex of a project to step-by-step here and will require a lot of workflow planning. Sounds like your essentially trying to set up a hosting business. If you can't find a command line FTP server (I have none to recommend) you can do a Geocities-like file manager with file uploads, but that is a whole other can of worms. Take a look at the bullets, see if this is practical for you.

Good luck.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.