In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces how to modify the default path of the apache server under linux, which has a certain reference value. Interested friends can refer to it. I hope you can learn a lot after reading this article.
Introduction:
Apache is the number one Web server software used in the world. It can run on almost all widely used computer platforms, and is one of the most popular Web server-side software because of its cross-platform and security. It is fast, reliable and can compile interpreters such as Perl/Python into the server through a simple API extension.
The specific methods are as follows:
One: check whether apache is installed on the server, stop and uninstall the system's own apache service
The command is:
Rpm-qa | grep httpdrpm-e-- nodeps httpd-tools..
2: upload all the packages required for the httpd service installation after the uninstall is complete
Install the cloud disk with the following address: http://pan.baidu.com/s/1qYTgomo password: nk7z
I uploaded it to the / usr/local directory, unzipped it and installed it
Three: install the above installation package and install it sequentially
Install apr to resolve apr not found issues
Install apr-util to resolve apr-util not found issues
Install pcre to resolve pcre not found issues
Install httpd
[root@zdhcs5 local] # tar zxvf httpd-2.4.7.tar.gz [root@zdhcs5 local] # cd httpd-2.4.7 [root@zdhcs5 httpd-2.4.7] #. / configure-- prefix=/usr/local/apache2-- with-apr=/usr/local/apr-- with-apr-util=/usr/local/apr-util/-- with-pcre=/usr/local/pcre (in addition to specifying the installation directory of Apache, install apr, apr-util, pcre And specify parameters) [root@zdhcs5 httpd-2.4.7] # make [root@zdhcs5 httpd-2.4.7] # make install
4: start the apache service and verify that the installation is successful. Enter the URL of the browser and it works indicates that the installation is successful.
1 [root@zdhcs5 bin] # cd / usr/local/apache2/bin/2 [root@zdhcs5 bin] #. / apachectl start
5: change the default display path of apache to a custom path
My custom path is the automation results report path, that is, when you open the URL, you can see the automation results reports running on the linux server
My custom automation results report path is (under autotest): / home/autotest/workspace/auto-project/test-output/html
There are two things that need to be modified to modify the configuration file of apache:
1 [root@zdhcs5 local] # vi / usr/local/apache2/conf/httpd.conf
First place: modify the path
Before modification, it is:
After modification, it is:
Second: modify users and groups. The reason why the daemon user is changed to autotest is to give apache access to my custom path, because my custom path is under the autotest user.
Before modification:
After modification:
After saving, exit and restart the apache service:
1 [root@zdhcs5 local] # cd / usr/local/apache2/bin2 [root@zdhcs5 bin] #. / apachectl stop3 [root@zdhcs5 bin] #. / apachectl start
After the startup is successful, in order to prevent the access address in the browser from reporting no permission, we also need to modify the permission of the entire path of the custom file to 755
The custom path is configured as above: / home/autotest/workspace/auto-project/test-output/html
Use the autotest user to execute the following command: (autotest is the user of your custom path), modify it according to the actual
1 [autotest@zdhcs5 html] $chmod-R 775 / home/autotest/workspace/auto-project/test-output/html
Then go to the browser to verify whether it is successful or not, and refresh the browser address you just gave:
At this point, install apache under linux and change the default path to a custom path.
Thank you for reading this article carefully. I hope the article "how to modify the default path of apache server under linux" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.