Install Apache from source 1. Upload the Apache source code to install the required software packages 2. Installation: Installation Order yum -y install gcc gcc-c++ apr compilation and installation tar xzf apr-1.4.6.tar.gz cd apr-1.4.6 ./configure --prefix=/usr/local/apr make && make install Compile and install apr-util tar xzf apr-util-1.5.1.tar.gz cd apr-util-1.5.1 ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/ make && make install pcre compilation and installation tar xzf pcre-8.32.tar.gz cd pcre-8.32 ./configure --prefix=/usr/local/pcre make && make install httpd compilation and installation tar zxf httpd-2.4.41.tar.gz cd httpd-2.4.41 ./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre/ --enable-so --with-mpm=prefork make && make install Configure IP-based virtual hosts to add IP to the host Temporary addition (restart network card invalid) Permanently add a copy of the network card configuration file and edit it Restart the network card to view the results Create two virtual hosts' website root directories and test pages Modify the main Apache configuration file Location: /usr/local/apache/conf/httpd.conf Authorize the two website root directories of the virtual host Otherwise, an access denied error will be reported with a status code of 403. Uncomment the line containing the virtual host. Edit the virtual host configuration file Location: /usr/local/apache/conf/extra/httpd-vhosts.conf Start Apache service View the effect This concludes this article on the detailed tutorial on Apache source code installation and virtual host configuration. For more relevant Apache virtual host configuration content, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: MySQL Query Cache and Buffer Pool
>>: Detailed explanation of HTML form elements (Part 2)
1. Import echart in HTML file <!-- Import echa...
The image tag is used to display an image in a we...
1. Business Scenario I have been doing developmen...
In Google Chrome, after successful login, Google ...
Origin of the problem When using docker, I unfort...
Table of contents 1. Built-in objects 2. Math Obj...
In the nginx process model, tasks such as traffic...
MySQL installation is relatively simple, usually ...
1. Dynamically create objects There are two ways ...
Source code preview: https://github.com/jdf2e/nut...
1. Two ways to define react components 1. Functio...
Preface The reason for writing this article is mai...
Edit /etc/docker/daemon.json and add the followin...
Table of contents 1. Decoupled assignment of arra...
First, what is box collapse? Elements that should...