As the title states, I want to modify the default access folder path of Apache under my user (Donny). In other words, modify the path accessed by http://localhost/~Donny/. The current default access path is ~/Website. Can it be changed to another location? How to write the user's configuration file?
No one answered. .
find . -name http.conf
vi http.conf Modify the <DocumentRoot> item and specify the path you want
I don’t know if it can solve the problem, I just provide an idea.
Change host.
I am currently using the mac apache environment. The configuration is similar to that of linux. The main problem is that the permissions issue needs to be dealt with. If you are lazy, you can do some work on the user while apache is running
Complete your needs by modifying the http-vhosts.conf file.
Here is the configuration snippet from that profile on my Mac
By default, the directory of my apache program is in /etc/apache2, and the configuration file is in the extra directory under this directory. There are many configuration files in it. These configuration files are generally under the /etc/apache2 directory. Referenced by the main configuration file httpd.conf.
You can refer to my configuration snippet to modify your http-vhosts.conf file. After the modification is completed, you need to restart apache.
In fact, these configurations are the same whether on Mac or Linux. The official apache documentation also provides detailed documentation. As long as you read it patiently, you will find the answer quickly.
Hope this helps.