<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>

CC BY-SA 3.0
2017-08-11T17:18:54.300Z
2017-08-11T17:18:54.300Z
andrew.welch
<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>

<nginx>
Craft 3 beta nginx config
# 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)


---

