我正在使用Yii 1,并将其移动到AWS。
在我的服务器上Yii安装在/var/www/html
当我转到我的URL时,出现404错误。
下面是我的/etc/apache2/sites-available/000-default.conf
文件
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/frontend/www
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
而我的.htaccess
文件位于我的/var/www/html/frontend/www
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /html/frontend/www/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /html/frontend/www/index.php [L]
</IfModule>
你知道我错过了什么吗?谢谢
2条答案
按热度按时间u2nhd7ah1#
我在我的
/etc/apache2/sites-available/000-default-le-ssl.conf
中添加了这个这个在我的.htaccess里
现在它的工作,我可以查看子目录在我的网址
ca1c2owp2#
HTTP访问
检查你的index.php是否被调用?