I have deployed my apps on apache and can access them from sites-available . but at a time I can enable 1 I think. how to enable both at a time in on diff port?
Asked
Active
Viewed 967 times
1 Answers
2
Add the 2nd port to listen to at /etc/apache2/ports.conf. It will have a line looking like
Listen 80
add a 2nd line to it with another portnumber (Listen 81 as an example).
Your config in sites-available has a <VirtualHost *:80 for port 80. Change that for the 2nd site to <VirtualHost *:81>. Change ServerName and DocumentRoot to the 2nd site. Also change the name of the error log so you have logs for both sites and not one combining them.
If you also need ssl: ports.conf will also have a section for that and you can duplicate that too: add a port inside the IfModule sections.
Restart apache for it to take effect.
Rinzwind
- 309,379