# Deploy slim project to webserver

**URL:** <https://discourse.slimframework.com/t/deploy-slim-project-to-webserver/4444>\
**Category:** Questions\
**Created:** [October 13, 2020, 6:53pm UTC](https://discourse.slimframework.com/t/deploy-slim-project-to-webserver/4444 "2020-10-13T18:53:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sim](https://avatars.discourse-cdn.com/v4/letter/s/bbe5ce/32.png) [@sim](https://discourse.slimframework.com/u/sim)\
**Post date:** [October 13, 2020, 6:53pm UTC](https://discourse.slimframework.com/t/deploy-slim-project-to-webserver/4444/1 "2020-10-13T18:53:19Z")

</div>

Hello 🙂

I finished a small slim project and want to upload it to my web server via filezilla.  
So for every domain it creates a folder in my ‘www’ folder. Now I need to upload my website to this www subfolder.

The structure of my slim project ist as follow:  
 ![slim project structure](https://canada1.discourse-cdn.com/flex030/uploads/slimframework/original/2X/3/3bd2edd16015fa44769b5e740a72e8ac2fe4f47a.png)

In the public folder is my index.php and .htaccess file.  
index.php:  
\<?php

```
require __DIR__. '/../vendor/autoload.php';

require __DIR__. '/../bootstrap/app.php';

$app->run();

```

.htaccess:

```
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [QSA,L]

```

The site shows an HTTP ERROR 500.

Can someone please help me?

---

<div class="post-metadata">

**Author:** ![tflight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/tflight/32/1205_2.png) [@tflight](https://discourse.slimframework.com/u/tflight)\
**Post date:** [October 14, 2020, 10:54am UTC](https://discourse.slimframework.com/t/deploy-slim-project-to-webserver/4444/2 "2020-10-14T10:54:06Z")

</div>

Your server logs will give you further details about the `500` error. Without knowing about your environment, you need to figure out where the domain’s root is. For example without any Slim app, where would the index.html file go? What is the name of that folder? That is your web root folder.

Your `index.php` and `.htaccess` files that are in your `public` folder would go into that web root, and the other directories (like `app`, `bootstrap`, `routes`, etc) and files (`composer.json`, etc) would go alongside your web root folder.

So if your web root is named `www` you would have:

- app/
- bootstrap/
- www/ (with your `index.php` and `.htaccess`)
- routes/
- vendor/
- views/
- composer.json
- composer.lock

---

<div class="post-metadata">

**Author:** ![odan](https://avatars.discourse-cdn.com/v4/letter/o/9de053/32.png) [@odan](https://discourse.slimframework.com/u/odan)\
**Post date:** [October 15, 2020, 12:57pm UTC](https://discourse.slimframework.com/t/deploy-slim-project-to-webserver/4444/3 "2020-10-15T12:57:41Z")

</div>

As @tflight said before, you can change your public/ path to www/ to be conform with your webhost, or you can keep the `public/` directory by defining `public/` as your web server’s document root. Most providers should be able to support these configuration settings.
