Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-13-2005, 06:56 AM   #1
Registered: Oct 2004
Posts: 84

Rep: Reputation: 15
Allow file upload in httpd.conf?

I would like to allow visitors on my webpage to upload files on my server, and I have a perl-script that runs it through a mailform... No problems, and I get the inputs with no errors, but there are no files in my upload-dir. I'm sure I've configured the script right.

I'm guessing that I have to configure apache to allow this?

The path is /var/www/upload and I've set premissions to chmod a+rwx on the upload-dir...

I'm using Apache 1.3.26 on an Debian....

What do I need to add in httpd.conf to get apache to allow file upload to this dir?


Old 05-13-2005, 08:33 AM   #2
Registered: Mar 2004
Location: Minnesota
Distribution: Fedora Core 1, Mandrake 10
Posts: 405

Rep: Reputation: 30
Just looking around for possible answers, here's what I've found...

If you are going to try and upload files through a form, always make
sure you that you set the form to allow files by adding this attribute;


Otherwise your form field that should contain the file will be empty,

and perhaps there's something here:

Another possibility might be that permissions of /var/www, which I would not advise changing. Perhaps move the upload directory into the html directory (assuming you have the standard /var/www/html structure) and perhaps even let apache own it

chown apache:apache /var/www/html/upload

That's all the ideas I've got...

Good luck, let us know if you get it...
Old 05-13-2005, 09:07 AM   #3
Registered: Oct 2004
Posts: 84

Original Poster
Rep: Reputation: 15
Thanks for your reply...

My form is OK, and I have no apache user...

My html root are /var/www/ where I have all my html-files, and I don't want to change any premissions here. It's only the /var/www/upload-dir I want them to upload to...

I changed the script so that the default upload path are /tmp/ and default url are

And then I added this in httpd.conf:
Alias /tmp/ /tmp/

<Directory /tmp/>
 Order All
 AllowOverride All
 allow from all
Then restarted apache..

No luck - it won't work, but works fine in my browser...



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
2 httpd.conf file, which one is being used? newlinuxnewbie Linux - General 2 11-27-2005 05:43 PM
Apache httpd.conf file?? matux Mandriva 2 01-28-2005 10:20 AM
How to open and Editin httpd.conf file kakagak Linux - General 3 08-24-2004 01:35 PM
saving changes to apache2/conf/httpd.conf file Zaius Linux - Newbie 6 01-10-2004 12:45 AM
httpd.conf File? HappyDude Linux - Software 3 08-16-2003 01:38 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:27 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration