簡體   English   中英

我們如何在AWS EC2 Linux實例的不同端口上安裝多個apache服務器

[英]How can we install multiple apache servers at different ports in aws ec2 linux instance

我想在一台ec2 linux機器上的不同端口上運行多個具有不同文件結構的ec2 linux服務器上安裝多個apache服務器。 請指導我如何在一台機器上安裝多個apache服務器。

您可以使用VirtualHost指令僅運行一個apache服務器。

例如:

<VirtualHost *:80>
  ServerName www.example.org
  DocumentRoot /www/otherdomain-80
</VirtualHost>

<VirtualHost *:8080>
  ServerName www.example2.org
  DocumentRoot /www/otherdomain-8080
</VirtualHost>

將監聽運行同一apache服務器的端口808080 可以在同一台服務器上運行兩個apache實例,但這有點麻煩。 請記住,任何大於1024的端口均受Linux保護,您將只能將端口443和80與Apache綁定,否則必須為1025及更高版本的端口。

此處有更多信息:

http://httpd.apache.org/docs/2.2/vhosts/examples.html

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM