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
The document root (web root) directory is located at /opt/lampp/htdocs/ . All files placed in this directory will be processed by the web server. To host other files on your system with XAMPP, you can configure an alias with Apache.
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.
See screenshot:

# # DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. # DocumentRoot "C:/xampp/htdocs" <Directory "C:/xampp/htdocs"> 
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With