Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I did a wget on the source and built the apache binaries correctly.

  • Now what do I need to do to get some documents accessible using HTTP (start some services?)? Also, do I need to group all the files I want to make accessible in some directory and make the directory and its contents accessible or can I just make the individual documents available?

  • I will be providing these links to my colleagues and do not want them to be down, so need to make sure that the apache services are up automatically after a reboot. Does apache have some inbuilt support for this?

share|improve this question

2 Answers 2

Now what do I need to do to get some documents accessible using HTTP (start some services?)?

After compiling, you need to install the files. Usually it's make install as root.

  • However, most Linux distros already have Apache2 in their repositories – compiled, configured, etc. It's also more convienent than installing from source, since you get updates automagically.

    (Admittedly, you won't get the latest "beta" that way, but do you need it just to serve a few files? Stick to the stable version.)

Also, do I need to group all the files I want to make accessible in some directory and make the directory and its contents accessible or can I just make the individual documents available?

You can only serve entire directories.

The default configuration of Apache2 usually points to /srv/http or /var/www, depending on the system.

  • The default location for Apache2's config seems to be /etc/httpd/conf/httpd.conf. Look for a line that says "DocumentRoot".

  • If using Debian's apache2 package, you can change it in /etc/apache2/sites-available/default.

Next, start Apache2. Again, depending on the system, it may be one of the following:

  • /etc/init.d/apache2 start
  • /etc/init.d/httpd start
  • /etc/rc.d/init.d/httpd start
  • /etc/rc.d/httpd start
  • httpd

Make sure you run the command as root.

I will be providing these links to my colleagues and do not want them to be down, so need to make sure that the apache services are up automatically after a reboot. Does apache have some inbuilt support for this?

This depends on the operating system. On some Linux distros (Debian, Ubuntu), the initscript is added to the list of daemons to start automatically. On others you have to do it manually (in Arch, by editing /etc/rc.conf).

share|improve this answer

Just saw your question and I immediately thought of Dropbox. Check out http://www.dropbox.com/ and it just might be what you need. This way you will have http and web gui access to stored files from where-ever there is an internet connection. There are even shared folders you can create if you get your colleagues join too.

Not what you asked for, but could be a better, easier solution. :)

And no I don't work for them, just love the service!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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