I am deploying a Craft site, I have it installed and everything is working fine, but whenever I try to access the admin panel I get a generic 404. I have tried every solution offered in similar questions, none of them work.
Here's my .htaccess
file:
<IfModule mod_rewrite.c>
RewriteEngine On
# Send would-be 404 requests to Craft
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/(favicon\.ico|apple-touch-icon.*\.png)$ [NC]
RewriteRule (.+) index.php?p=$1 [QSA,L]
</IfModule>
And my Apache Virtual Host file:
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName servername.com
ServerAlias www.servername.com
DocumentRoot /var/www/servername.com/public_html/web/
<Directory /var/www/servername.com/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<IfModule mod_dir.c>
DirectoryIndex index.php index.pl index.cgi index.html index.xhtml index.htm
</IfModule>
</VirtualHost>
Making the url hostname/index.php/admin does work, however. Any suggestions would be much appreciated, or if more information is required please let me know.