I want to install multiple apache servers on ec2 linux servers operating at different ports and having different file structures in one ec2 linux machine. Please guide me on how can i install multiple apache servers in one machine.
You can just run a single apache server using the VirtualHost
directive.
For example:
<VirtualHost *:80>
ServerName www.example.org
DocumentRoot /www/otherdomain-80
</VirtualHost>
<VirtualHost *:8080>
ServerName www.example2.org
DocumentRoot /www/otherdomain-8080
</VirtualHost>
Will listen to both port 80
and 8080
running the same apache server. Running two apache instances on the same server is possible but it's kinda messy. Keep in mind that any port > 1024 is protected by Linux, you will only be able to bind ports 443 and 80 with Apache, otherwise it has to be ports 1025 and above.
More information here:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.