0

I have inherited a WAMP setup, but needed my http://localhost to point to a different directory "C:/Users/[user.name]/htdocs" due to many dependencies. I made the following changes in httpd.conf

  1. DocumentRoot "C:/Users/[user.name]/htdocs"
  2. <Directory "C:/Users/[user.name]/htdocs">

where the original path was "c:/wamp/www/"

Now the WAMP default path for phpMyAdmin http://localhost/phpMyAdmin is not working anymore.

Is it possible to fix that via either C:\wamp\alias\phpmyadmin.conf or httpd-vhosts.conf somehow?

retrovertigo
  • 538
  • 9
  • 20

1 Answers1

0

Can I suggest a better solution to your requirement to have a site running that does not live in the WAMPServer default location i.e. \wamp\www or \wamp\www\somefolder

If you revert all your httpd.conf changes to the out of the box state and then create a Virtual Host to run the site you have located in your \user.... folder.

Virtual Hosts are a standard Apache feature that allows you to run may sites from a single instance of Apache, a bit like a shared hosting package setup.

You would then have the benefits of the WAMPServer homepage running on localhost and all the other alias's tools as well.

You can then run your site using a nice url for example sitename.dev and the virtual host definition also allows you to setup any site specific requirements without effecting any other site you may want to run.

There is a HowTo Setup Virtual Hosts here on SO

Community
  • 1
  • 1
RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
  • Thanks Riggs, I was thinking about it as well, but I have some dependencies regarding the URL `http://localhost` as dev env as well. I do see your point, though, and if you say that is the best solution I will revert to that. Thanks for your input and help. – retrovertigo Mar 30 '15 at 12:10
  • Actually I need `http://localhost` to point to this folder as e. g. VirtualBox's `10.0.2.2` is pointing to the host's `http://localhost` ... I know I somehow managed to get something like it setup with XAMPP, but I can't recall exactly how ... – retrovertigo Mar 30 '15 at 21:00