Use the following command to require SSH to log on to the server, and then execute the following command in turn.
First step: Update system components
Apt-get Update
Apt-get upgrade–show-upgraded
Step Two: Install Apache2
Apt-get Install Apache2
Start rewrite support for apache2
A2enmod rewrite
Step three: Create a new site, configure the virtual host
The configuration file path for the new site is:/etc/apache2/sites-available/
Create a new profile using the Vim www_jicker_cn.conf command, and then use the Shift+insert key to insert the following configuration file
<virtualhost *:80>
ServerAdmin admin@111cn.net
ServerName 111cn.net
Serveralias www.111cn.net
documentroot/www/www_jicker_cn/public_html/
Errorlog/www/www_jicker_cn/logs/error.log
Customlog/www/www_jicker_cn/logs/access.log combined
</VirtualHost>
Step Fourth: Create a Web site directory and log directory
Mkdir-p/www/www_jicker_cn/public_html
Mkdir/www/www_jicker_cn/logs
Step Fifth: Execute the command to start the site
A2ensite www_jicker_cn.conf
Step Sixth: Restart Apache2
Service Apache2 Restart
Seventh step: Optimize the configuration of apache2
To edit a apache2 configuration file using the vim/etc/apache2/apache2.conf command
<ifmodule mpm_prefork_module>
Startservers 2
Minspareservers 6
Maxspareservers 12
MaxClients 80
Maxrequestsperchild 3000
</IfModule>
Summarize
As a back-end service, the ability to resist pressure is much worse than Nginx. More optimized configuration is not available, recommended in the formal production environment or on the Nginx bar.