For the installation and deployment of Ubuntu under Apache, refer to the previous articles.
Today, we mainly introduce the deployment of multiple Web projects under one server through Apache.
Idea: Using the same IP, using different ports, to map to different projects
The main need to change the following three configuration points:
1. Modify the prot.conf file under/etc/apache
Add one more port for monitoring, as follows
Listen 5001
<ifmodule ssl_module>
Listen 443
</IfModule>
<ifmodule mod_gnutls.c>
Listen 443
</IfModule>
2. Modify/etc/apache/sites-enabled under 000-default.conf
To add a mapped project catalog:
<virtualhost *:5001>
ServerName 127.0.0.1
ServerAdmin webmaster@localhost
documentroot/home/wq/ downloads/spritesheet/
errorlog ${apache_log_dir}/error.log
customlog ${apache_log_dir}/access.log Combined
</VirtualHost>
3. Modify the access rights and modify the/etc/apache2/apache2.conf
<Directory/home/wqdata/Downloads/spritesheet/>
Options Indexes followsymlinks
allowoverride None
Require all granted
</Directory>
Through the above three steps, you can, good Luck.