Printable Version of Topic

Click here to view this topic in its original format

Linuxhelp _ Tips and Tricks _ Configuring Apache.....

Posted by: Hemant Dec 10 2003, 06:30 AM

for all of us who are using apache...(as a production level server or just a test server or using it in intranet)..

You can make apache to access user directories /home/hemant(for example) and webpages available there accessible to in this way every user can have a website of his own....sounds goes method to accomplish this....
1.edit file /etc/conf/httpd.conf
and you will see a variable
and next line enables this variable...uncomment both lines and make sure user directories are enabled.. those users who wanted to have webpages of their own can create a directory ~/public_html and make it readable to all..
$ chmod 755 public_html

PS:i am posting this tip from a windows machine so i am not sure about location of file httpd.conf .

Posted by: Termina Feb 18 2004, 10:38 AM

So I assume you'd then type in "http://localhost/hemant" to see that users webpage?

Posted by: chrisw Feb 18 2004, 11:23 AM

i think it would be http://localhost/~username
could be wrong though...i dont allow users to have their own pages

Posted by: Termina Feb 18 2004, 11:44 AM

How would I stop certain files from being uploaded (or atelast accessed) with Apache (or uploading via SSH/FTP)

For example, I only want them to be able to upload .jpg, .png, .gif, .graal, .html, and .php pages (NO exe, zip, rar, avi, etc.)
Thanks in advance!

Posted by: Hemant Apr 8 2004, 08:17 AM

First..of access the user dirctory it will be

http://localhost/~hemant(provided index.html file exists in the ~/public_html directory).

Now about the second question..file handling has to be php(or cgi).
you can easily write the php script...which will deny upload of certain files..

Or a quick can use javascript...simply check the name of the file..that is being uploaded..and check for it's extension..and generate a warning and don't allow user to post that file.

If you want i can post the script...

Posted by: chrisw Apr 11 2004, 09:53 PM

i have a good script that works great...ill have to hunt it down and provide a link for it or post it here...ill see if i can find it

Posted by: Termina Jun 1 2004, 02:26 PM

Thanks, I'd love that script. happy.gif

Powered by Invision Power Board (
© Invision Power Services (