Local web server

If your Apache web server is installed on your local machine and you have control of it's configuration, this is really pretty easy.

You will want to set up a VirtualHost configuration for each site domain (whether real or 'made up') that you want to work on. Locate the http.conf file in your Apache/conf directory. Near the bottom will be a sample VirtualHost set up. Pay particular attention to the DocumentRoot directive. You want to point this to the subdirectory where you installed Drupal. Full documentation is available at http://apache.org/docs. If you haven't already, edit your hosts file to point the new domain to your local machine.

That's it!

Restart your web server and it should allow you to browse to http://example.com. If you still see the subdirectory appended to the browser location, go to your Drupal site folder and edit the settings.php file. Set $base_url = 'http://example.com'; . Now it should work as expected.

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.