6

I've recently installed Apache HTTP server on my computer. I have two questions:

  1. When I enter my IP from the browser, I see a list of files/directories, just like in a FTP server. Is that a built in feature of Apache or Chrome browser?
  2. More important - how do I upload files from a remote computer to a selected folder in my server? I am really short on time and I was thinking there might be a built in way to do so, but could'nt find it. Is there?

Thanks in advance

6

I've recently installed Apache HTTP server on my computer. I have two questions:

When I enter my IP from the browser, I see a list of files/directories, just like in a FTP server. Is that a built in feature of Apache or Chrome browser?

That is a function of Apache. By default, the mod_dir module is loaded and the Indexes option is enabled. The effect is that if someone visits a directory (which has no appropriate index page) directly instead of a specific file, then instead of returning a 404, Apache dynamically generates a directory listing webpage showing a list of files.

It is generally considered inadvisable to keep this option enabled because it usually ends up exposing files that should not be exposed, so it is usually safer to disable it:

  1. Open your httpd.conf file
  2. Find your directory root(s) (e.g., <Directory …>)
  3. Remove the Indexes value from the Options directive:
    Options FollowSymLinks MultiViews Indexes

    Options FollowSymLinks MultiViews

More important - how do I upload files from a remote computer to a selected folder in my server? I am really short on time and I was thinking there might be a built in way to do so, but could'nt find it. Is there?

Not as such. Apache is a web-server which means it is meant primary as a one-way server to fetch and send web-pages to clients. There is some upload-functionality which can be used to upload pages to the server, but that requires installing and configuring back-end server software like PHP, Perl, Ruby, CGI, etc. as well as setting up an appropriate server page and client-interface page.

If what you want to do is to simply upload files to the server, then you are far better off just installing an FTP (File Transfer Protocol) server. A popular (and open-source) FTP software is FileZilla which includes both client and server components.

Just remember to set up an account and password; you do not want to leave it open otherwise people could use it as a file-dump for illegal files and fill up your drive.

| improve this answer | |
0

1) this is a feature of Apache. It will present a list of all files within the root directory if it can't find an index.html or index.php file.

2) That will depend on your setup. If you have Apache installed onto your computer, there will be a path configured within Apache to define where the website starts.
If you just copy files into that directory, then that's "uploading" files to your server.

It might be an idea to look up how web servers work so you can get a basic understand of what Apache is doing on your computer.

| improve this answer | |
  • 1
    1) thanks. 2) I know that, but I want to be able to upload from a remote computer. I'll edit my question so it's more clear – Yotam Dec 14 '13 at 14:54
  • You should install an FTP server on your computer. But be careful a badly configured FTP server is a high security risk. – NoNameProvided Dec 14 '13 at 15:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.