So, I have a project I am working on, but I want to work on a different project which requires a different Apache directory AND different MySQL database. I have never really messed with XAMPP configurations so I don't know how to do this, help will be greatly appreciated! thanks.
Asked
Active
Viewed 1,785 times
0
-
You can have sub directory and multiple database with xampp, is that want you want? I am kind of confused – Woody Jan 06 '16 at 19:07
-
yes, just how is that done? – ZeroByter Jan 06 '16 at 19:08
-
You can achieve multiple applications by having multiple documents roots(each in another dir). You can have as many mysql db's as your configurations allows. You should further expand your question. maybe add your current dir structure etc... – Kisaragi Jan 06 '16 at 19:08
-
Why do you need a different Apache directory? – Allan Jan 06 '16 at 19:09
-
2Define a separate (virtual) host per project/application. Take a look at the documentation of the apache http server on how to do that. – arkascha Jan 06 '16 at 19:09
-
For the applications, simply create the folders needed into htdocs apache folder. For mysql, create another database normaly and on the new application, add the PHP code for connecting to that database. – Allan Jan 06 '16 at 19:15
-
For a better professional development environment, I recommend that you take a look: [Laravel Homestead](https://laravel.com/docs/5.2/homestead). You will not have problems like this, because directly you write the local domain for working. – Allan Jan 06 '16 at 19:23
-
This post is aimed at WAMPServer, but all that is different is the directory structure for XAMPP and Virtual Hosts are a breeze once you get the first one working http://stackoverflow.com/questions/23665064/project-links-do-not-work-on-wamp-server/23990618#23990618 – RiggsFolly Jan 06 '16 at 19:53
1 Answers
3
Let's say your DocumentRoot in httpd.conf file is directed to xampp\htdocs
. Assuming you're trying to set up a WordPress project and a drupal project, create two folders under htdocs wp
and drupal
and have your projects inside them. You'll be hitting the projects by http://localhost/wp
and http://localhost/drupal
. Create two virtual hosts entries in hosts-config file to give different server URLs to your projects.

venkatKA
- 2,399
- 1
- 18
- 22
-
-
Go for the Virtual Host method as it makes moving sites from test to live more reliable – RiggsFolly Jan 06 '16 at 19:51