Php 在AWS ec2中使用多个虚拟主机部署lumen项目

Php 在AWS ec2中使用多个虚拟主机部署lumen项目,php,apache,.htaccess,ubuntu,lumen,Php,Apache,.htaccess,Ubuntu,Lumen,我需要在AWS ec2 ubuntu服务器上部署三个站点(相同的ip), html(默认站点) aaa.com(www.aaa.com) bbb.com(www.bbb.com) /var/www: html public index.html aaa.com public_html index.html bbb.com public_html app bootstrap public .. <IfModule

我需要在AWS ec2 ubuntu服务器上部署三个站点(相同的ip),

  • html
    (默认站点)
  • aaa.com
    (www.aaa.com)
  • bbb.com
    (www.bbb.com)
/var/www:

html
  public
    index.html

aaa.com
  public_html
    index.html

bbb.com
  public_html
     app
     bootstrap
     public
     ..
<IfModule mod_rewrite.c>
     RewriteEngine On
     RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
<VirtualHost *:80>
    ServerAdmin bbb@gmail.com
    ServerName bbb.com
    ServerAlias www.bbb.com
    DocumentRoot /var/www/www.bbb.com/public_html
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    <Directory /var/www/www.bbb.com/public_html>
          Options FollowSymLinks MultiViews
          AllowOverride All
    </Directory>
</VirtualHost>

html
aaa.com
是纯html项目,
bbb.com
是lumen项目,当我添加.htaccess文件时,站点将始终收到500内部服务器错误。
如果我删除
.htaccess
该站点将被禁止使用403(我想是因为链接多视图之后的
选项),如何正确地为
bbb.com
重写lumen站点?有什么想法吗

bbb.com
.htaccess文件:

html
  public
    index.html

aaa.com
  public_html
    index.html

bbb.com
  public_html
     app
     bootstrap
     public
     ..
<IfModule mod_rewrite.c>
     RewriteEngine On
     RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
<VirtualHost *:80>
    ServerAdmin bbb@gmail.com
    ServerName bbb.com
    ServerAlias www.bbb.com
    DocumentRoot /var/www/www.bbb.com/public_html
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    <Directory /var/www/www.bbb.com/public_html>
          Options FollowSymLinks MultiViews
          AllowOverride All
    </Directory>
</VirtualHost>

重新启动发动机
重写规则^(.*)$public/$1[L]
/etc/apache2/sites available/bbb.com.conf:

html
  public
    index.html

aaa.com
  public_html
    index.html

bbb.com
  public_html
     app
     bootstrap
     public
     ..
<IfModule mod_rewrite.c>
     RewriteEngine On
     RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
<VirtualHost *:80>
    ServerAdmin bbb@gmail.com
    ServerName bbb.com
    ServerAlias www.bbb.com
    DocumentRoot /var/www/www.bbb.com/public_html
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    <Directory /var/www/www.bbb.com/public_html>
          Options FollowSymLinks MultiViews
          AllowOverride All
    </Directory>
</VirtualHost>

服务器管理员bbb@gmail.com
ServerName bbb.com
ServerAlias www.bbb.com
DocumentRoot/var/www/www.bbb.com/public\u html
ErrorLog${APACHE_LOG_DIR}/error.LOG
CustomLog${APACHE\u LOG\u DIR}/access.LOG组合
选项如下符号链接多视图
允许超越所有