Answers.Body: <p>In my case, my url routing wasn't functional because the <code>mod_rewrite</code> module in Apache was disabled. I enabled it with <code>a2enmod</code>, restarted Apache, and my problem was solved.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-07T01:06:52.430Z
Answers.LastActivityDate: 2020-06-07T01:06:52.430Z
Answers.UserDisplayName: jkofskie
Body: <p>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 <code>.htaccess</code> file:</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
      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]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>And my Apache Virtual Host file:</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
          ServerAdmin info@servername.com
      ServerName servername.com
      ServerAlias www.servername.com
          DocumentRoot /var/www/servername.com/public_html/web/
  
          &lt;Directory /var/www/servername.com/&gt;
              Options Indexes FollowSymLinks
              AllowOverride All
              Require all granted
          &lt;/Directory&gt;
  
          ErrorLog ${APACHE_LOG_DIR}/error.log
          CustomLog ${APACHE_LOG_DIR}/access.log combined
  
          &lt;IfModule mod_dir.c&gt;
              DirectoryIndex index.php index.pl index.cgi index.html index.xhtml index.htm
          &lt;/IfModule&gt;
  
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>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.</p>
  
Tags: <craft3><apache>
Title: Admin and Dashboard showing 404
ThreadText: # Admin and Dashboard showing 404
  
  (Asked by: username_0 on 2020-06-01)
  
  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 info@servername.com
      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.
  
  **Tags:** craft3, apache
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2020-06-07. Score: 2 | Accepted answer
  
  In my case, my url routing wasn't functional because the `mod_rewrite` module in Apache was disabled. I enabled it with `a2enmod`, restarted Apache, and my problem was solved.
  
  
  ---
  
  