I
I
ImPuuLsE2015-06-04 15:23:58
Yii
ImPuuLsE, 2015-06-04 15:23:58

Why is there a 404 error in Yii2?

Hello! Delivered yii2 the main page opens, the rest give out:

Not Found

The requested URL /auth was not found on this server.
Apache/2.4.7 (Ubuntu) Server at site.com Port 80

Tell me what could be the matter? hosted on DigitalOcean
Here is the virtual host:
<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName site.com
    DocumentRoot /var/www/site.com/web
    ErrorLog /var/www/site.com/logs/error.log
    CustomLog /var/www/site.com/logs/access.log combined
    <Directory /var/www/site.com/web >
        Options Indexes FollowSymLinks Includes execCGI
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

Now 500 error, added AllowOverride All
The logs said that mod rewrite is not installed, fix it like this: sudo a2enmod rewrite && sudo /etc/init.d/apache2 restart

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lomoson, 2015-06-04
@Lomoson

For example, DirectoryIndex frontend/web/index.php in .htaccess might be missing, many reasons could be

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question