[Email protected]:~# apt-get Install apache2
[Email protected]:~# cd/etc/apache2/
[Email protected]:/etc/apache2# ls-l
Total 80
-rw-r--r--1 root root 7224 June 15:29 apache2.conf
Drwxr-xr-x 2 root root 4096 Jul 8 12:06 conf-available
Drwxr-xr-x 2 root root 4096 Jul 8 12:06 conf-enabled
-rw-r--r--1 root root 1782 June 15:25 Envvars
-rw-r--r--1 root root 31063 Jan 16:16 Magic
Drwxr-xr-x 2 root root 12288 Jul 10:05 mods-available
Drwxr-xr-x 2 root root 4096 Jul 10:05 mods-enabled
-rw-r--r--1 root root 332 Jul 8 11:40 ports.conf
Drwxr-xr-x 2 root root 4096 Jul 10:21 sites-available
Drwxr-xr-x 2 root root 4096 Jul 10:14 sites-enabled
[Email protected]:/etc/apache2# VI ports.conf
Listen 80
Listen 8080
<ifmodule ssl_module>
[Email protected]:/etc/apache2# cd sites-enabled/
[Email protected]:/etc/apache2/sites-enabled# cp 000-default.conf 001-default.conf
[Email protected]:/etc/apache2/sites-enabled# VI 001-default.conf
<virtualhost *:8080>
Documentroot/var/www/mysite
[Email protected]:/etc/apache2/sites-enabled# apachectl-k Restart
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Now, we have both site could be accessed. http://127.0.0.1, http://127.0.0.1: 8080
Setup Apache2 in Debian 9 and enable the ports for the sites