I’m using Yii 1, and moving it to AWS.
On my server Yii is installed in /var/www/html
When I go to my URL, I get a 404 error.
below is my /etc/apache2/sites-available/000-default.conf
file
<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>
And my .htaccess
file is located in my /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>
Any idea what I’m missing or doing wrong here? Thank you
2
Answers
I added this in my
/etc/apache2/sites-available/000-default-le-ssl.conf
and this in my .htaccess
now it works, and i can view sub directories in my url
Htaccess
check your index.php is called or not?