我需要在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
..
html
和aaa.com
是纯HTML项目,而bbb.com
是一个流明项目,当我添加.htaccess文件时,该网站将始终获得500内部服务器错误。<登记/>
如果我删除.htaccess
该网站将获得403 Forbidden(因为Options FollowSymLinks MultiViews
,我猜),如何正确重写bbb.com
的流明网站?任何想法?
bbb.com
。htaccess文件:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
/etc/apache2/sites-available/bbb.com.conf:
<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>