- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Adding File functionality to Apache
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 10:31 AM
09-15-2003 10:31 AM
I have a HP 900/765 running Apache, Squid, and secure ftp (chrooted dirs with quotas), no write access to home but access to "incoming" and "outgoing" dirs in their home.
I have several users that can not access the FTP server portion easily.
I want to add file functionality to HTTPD for users, similar to how they use FTP.
The only way I can see to accomplish this is with some CGI, which will look at the user name as they log in, and build dynamic pages on the fly.
While the basic meat and potato part is easy. Build a HTML doc with 2 links "incoming" and "outgoing", linked to a "incoming" and "outgoing" HTML doc which lists files, and links to the actual files in the dir.
Also, I can build a FORM to post data, but have no idea where the data goes or what context it's in after uploading.
What I can not seem to grasp, is how to get their login name from apache to build the pages.
Lastly, looking at the other services running on the system, it seems like there would be a much easier way to accomplish this.
Ideas on how to accomplish this easier and/or how to have Apache build dynamic pages based on login are both appreciated.
I know that lots of people have a ton more experience with Apache and HTML than I.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2003 01:46 AM
09-16-2003 01:46 AM
Re: Adding File functionality to Apache
For such a case, php is your friend !
I have one question :
the login is from a FORM or from a .htaccess,
from a form, then it's just a paramater you will get in your cgi script (or your php page if you select this option).
If it's from an apache authentication (.htaccess), then you should have a variable with the tool you are using to build your page.
example for the form :
And in your loginscript you receive the login+password, you just have to manipulate the values...
hope that help
Benoit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2003 04:33 AM
09-16-2003 04:33 AM
Re: Adding File functionality to Apache
First, the user must access a secure zone, so standard username/password and httpd security
AuthType Basic
AuthName "Restricted for FTP Users"
AuthUserFile /usr/local/apache2/etc/passwd
Require valid-user
The secondary login file will be parsed from the FORM
Now I may (depending on how secure I feel with the CGI) remove the top auth and use exclusively CGI.
I have jack squat experience with PHP.
Any good DOC's for it?
Thanks!
Shannon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2003 12:40 AM
09-17-2003 12:40 AM
Solutionwith PHP you don't have to use cgi script,
because it may be completly linked with apache, and a .php file will be interpreted by the php language. By this way, you build on the fly anything you want.
HEre's a sample :
login.html
<...>
<...>
And here's the login.php just a sample :
if $password=="
{
echo "OK your are authenticated..you can continue
";
}
else
{
echo "Hey you type a wrong user/password !!! you cannot connect";
exit;
}
?>
your place here your html stuff
if you want to add some login datas, just have to open a php part by :
if $login==....
{
echo "all your specific html..."
}
?>
or
this is some html datas, and you just want to print the login :
If you want to get the http authentication name (from your .htaccess file ) :
$PHP_AUTH_USER is the solution....
YOu have many ways...
Concerning docs, the reference manual from php.net is what I'm using...
hope that help
Benoit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2003 06:13 AM
09-17-2003 06:13 AM
Re: Adding File functionality to Apache
Time to get studying!
Shannon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2003 11:31 PM
09-17-2003 11:31 PM
Re: Adding File functionality to Apache
I understood concept and syntax very quickly and now I'm playing with it very often (I never use pure html file) even for scripting (you can run it in a command line like an interpreter).
The best advantages of PHP is the ability to connect to many databases very easily.
no points please, this is just an add for this product !
hope you will like it,
regards
Benoit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2004 04:43 AM
12-01-2004 04:43 AM