how to configuring a xampp web server for different root directory

后端 未结 10 1936
予麋鹿
予麋鹿 2020-12-02 07:17

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 controlle

10条回答
  •  一整个雨季
    2020-12-02 07:40

    In case, if anyone prefers a simpler solution, especially on Linux (e.g. Ubuntu), a very easy way out is to create a symbolic link to the intended folder in the htdocs folder. For example, if I want to be able to serve files from a folder called "/home/some/projects/testserver/" and my htdocs is located in "/opt/lampp/htdocs/". Just create a symbolic link like so:

    ln -s /home/some/projects/testserver /opt/lampp/htdocs/testserver
    

    The command for symbolic link works like so: ln -s target source where,

    target - The existing file/directory you would like to link TO.
    source - The file/folder to be created, copying the contents of the target. The LINK itself.
    

    For more help see ln --help Source: Create Symbolic Links in Ubuntu

    And that's done. just visit http://localhost/testserver/ In fact, you don't even need to restart your server.

提交回复
热议问题