Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm doing some work on a webpage, meaning I gotta modify a few things. As a result of this I installed apache and all the things that come associated with it, and also installed Joomla, and I got everything running well.

My problem is, I need to make apache run this website locally, so I downloaded the public_html folder from the FTP server on my website, but I have absolutely no idea how to implement the website in order to make it run on apache.

I've read a few guides, but they all tell me how to create a new website instead of helping me host a website already done.

share|improve this question

migrated from stackoverflow.com Nov 20 '11 at 0:59

This question came from our site for professional and enthusiast programmers.

It is not that hard but you will have to get your hands dirty :) It sounds like your Apache is currently only running the one site, which makes things a little easier.

  • Get Apache to start. In general, you enable as a service and it starts every time your computer starts. The exact command to do this depends on your operating system but most modern ones offer a 'Control Panel' or 'Configuration Settings'. Look for Services and either Apache or HTTPD under that.

  • The next is to figure out where your htdocs points to. That is controlled by a configuration file somewhere on your system, usually under /etc or /etc/apache2. The config is often directly in httpd.conf or default-server.conf.

For example on my system, file /etc/apache2/default-server.conf has a line that says:

DocumentRoot "/srv/www/htdocs"

If you copy the contents of public_html directory to that folder, then your website should be accessible. Make sure it is at least world-readable so that Apache can read it. You can reach it using or the name of your local machine.

There are tons of configuration reasons why the above may fail, so you consider this a starting point and do ask follow up questions as needed.

share|improve this answer

Is this site all HTML? If so you should only need to copy all files and folders starting at the site root (where your index page is) into the htdocs folder on your machine. htdocs is in different places depending on which platform you are using. At that point you should be able to go to http://localhost/ to view the pages.

However if your site does not use relative links you may find that many of your links are broken, or that they don't point to a page on your local machine.

share|improve this answer

Your Answer


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