Answers.Body: <p>This setup works fine with Craft 3:</p>
  
  <p><a href="https://github.com/nystudio107/nginx-craft" rel="nofollow noreferrer">Nginx-Craft</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-11T17:18:54.300Z
Answers.LastActivityDate: 2017-08-11T17:18:54.300Z
Answers.UserDisplayName: andrew.welch
Body: <p>I have a Craft 3 beta project working fine on my local <code>laravel/homestead</code> box using nginx, however when I push to Heroku using their <code>heroku-php-nginx</code> build pack I get nginx (not Craft) 404s when trying to access the <code>/admin</code> area.</p>
  
  <p>My <code>Procfile</code> looks like this:</p>
  
  <pre><code>web: vendor/bin/heroku-php-nginx -C deploy/nginx.conf public/
  </code></pre>
  
  <p>and my <code>deploy/nginx.conf</code> looks like this:</p>
  
  <pre><code>location / {
      try_files $uri @rewriteapp;
  }
  
  location @rewriteapp {
      rewrite ^(.*)$ /index.php?p=$1 last;
  }
  </code></pre>
  
Tags: <nginx>
Title: Craft 3 beta nginx config
ThreadText: # Craft 3 beta nginx config
  
  (Asked by: username_0 on 2017-08-11)
  
  I have a Craft 3 beta project working fine on my local `laravel/homestead` box using nginx, however when I push to Heroku using their `heroku-php-nginx` build pack I get nginx (not Craft) 404s when trying to access the `/admin` area.
  
  My `Procfile` looks like this:
  
  ```
  web: vendor/bin/heroku-php-nginx -C deploy/nginx.conf public/
  
  ```
  
  and my `deploy/nginx.conf` looks like this:
  
  ```
  location / {
      try_files $uri @rewriteapp;
  }
  
  location @rewriteapp {
      rewrite ^(.*)$ /index.php?p=$1 last;
  }
  
  ```
  
  **Tags:** nginx
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-08-11. Score: 1
  
  This setup works fine with Craft 3:
  
  [Nginx-Craft](https://github.com/nystudio107/nginx-craft)
  
  
  ---
  
  