How to configuring a xampp web server for different root directory?

0 votes

The web directory is the home of all of your application's public and static files. Including images, stylesheets and JavaScript files. It is also where the front controllers live.

So the question is when i install and set up xampp my web directory is:

xampp\htdocs

and I want to set it up for:

xampp\htdocs\myproject\web

How to do it? Now when I type in my browser the address: http://localhost/
I enter xampp\htdocs directory
and I want to type in my browser the address: http://localhost/
and enter xampp\htdocs\myproject\web directory

Oct 20 in PHP by kartik
• 35,300 points
77 views

1 answer to this question.

0 votes
Hello @kartik,

You can change Apaches httpd.conf by clicking (in xampp control panel) apache/conf/httpd.conf and adjust the entries for DocumentRoot and the corresponding Directory entry. Just Ctrl+F for "htdocs" and change the entries to your new path

Hope it helps!!
Thank you!!
answered Oct 20 by Niroj
• 76,540 points

Related Questions In PHP

0 votes
1 answer

How to see indexes for a database or table in MySQL?

Hello @kartik, To see the index for a ...READ MORE

answered Aug 18 in PHP by Niroj
• 76,540 points
64 views
0 votes
1 answer

How to grant remote access permissions to mysql server for user?

Hello @kartik, This grants root access with the ...READ MORE

answered Aug 26 in PHP by Niroj
• 76,540 points
248 views
0 votes
1 answer

How to copy a file from one directory to another using PHP?

Hello @kartik, You could use the copy() function : // Will ...READ MORE

answered Sep 15 in PHP by Niroj
• 76,540 points
45 views
0 votes
1 answer

How to trigger XDebug profiler for a command line PHP script?

Hello @kartik, You can pass INI settings with ...READ MORE

answered Sep 17 in PHP by Niroj
• 76,540 points
79 views
0 votes
1 answer

jQuery AJAX fires error callback on window unload - how do I filter out unload and only catch real errors?

Hello, In the error callback or $.ajax you have three ...READ MORE

answered Apr 27 in Java-Script by Niroj
• 76,540 points
437 views
0 votes
1 answer

How do I pass command line arguments to a Node.js program?

Hello @kartik, If your script is called myScript.js ...READ MORE

answered May 5 in Java-Script by Niroj
• 76,540 points
672 views
0 votes
1 answer

Error:Issue when trying to use IN() in wordpress database

Hello @kartik, Try this code : // Create an ...READ MORE

answered May 8 in PHP by Niroj
• 76,540 points
89 views
+2 votes
1 answer

How do I debug Node.js applications?

Hello @kartik, Use node-inspector  from any browser supporting WebSocket. Breakpoints, ...READ MORE

answered Jul 8 in Node-js by Niroj
• 76,540 points
87 views
0 votes
1 answer

How to get Root Directory Path of a PHP project?

Hello @kartik, Try $_SERVER['DOCUMENT_ROOT'] contains this path: D:/workspace In that case you ...READ MORE

answered Aug 31 in PHP by Niroj
• 76,540 points
1,033 views
0 votes
1 answer

How to concatenate text from multiple rows into a single text string in SQL server?

Hello @kartik, Use COALESCE: DECLARE @Names VARCHAR(8000) SELECT @Names = ...READ MORE

answered Jul 21 in PHP by Niroj
• 76,540 points
480 views