# Deploy Aplicação Laravel 5.1

**URL:** <https://forum.casadocodigo.com.br/t/deploy-aplicacao-laravel-5-1/295>\
**Category:** Livros\
**Tags:** laravel-php\
**Created:** [Agosto 30, 2016, 8:50am UTC](https://forum.casadocodigo.com.br/t/deploy-aplicacao-laravel-5-1/295 "2016-08-30T08:50:15Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![costaevangelista](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.casadocodigo.com.br/costaevangelista/32/14239_2.png) [@costaevangelista](https://forum.casadocodigo.com.br/u/costaevangelista)\
**Post date:** [Setembro 9, 2016, 1:43am UTC](https://forum.casadocodigo.com.br/t/deploy-aplicacao-laravel-5-1/295/2 "2016-09-09T01:43:36Z")

</div>

Boa noite tonyblack\_si, espero que minha resposta possa lhe ajudar, tive esse mesmo problema algum tempo atrás e nenhum tutorial resolveu meu problema tive que resolver só… mas aí vai a dica:

1º - Coloque a pasta do seu projeto Laravel 5.1 na raiz do seu servidor compartilhado.  
2º - Copie a pasta public do seu projeto Laravel para pasta public\_html  
3º - Renomeie a pasta public que vc colocou na pasta: public\_html ( com o nome de acesso que você deseja acessar a mesma: Por exemplo - [seudominio.com/novonomedapastapublic](http://seudominio.com/novonomedapastapublic) ).  
4º - No seu .htaccess que fica na pasta public renomeada coloque esse código abaixo depois salve:

 Options -MultiViews 

```
RewriteEngine On

# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

```

5º - Coloque essas config no seu index.php e salve

\<?php /\*\* \* Laravel - A PHP Framework For Web Artisans \* \* @package Laravel \* @author Taylor Otwell \*/ /\* |-------------------------------------------------------------------------- | Register The Auto Loader |-------------------------------------------------------------------------- | | Composer provides a convenient, automatically generated class loader for | our application. We just need to utilize it! We'll simply require it | into the script here so that we don't have to worry about manual | loading any of our classes later on. It feels nice to relax. | \*/ require \_\_DIR\_\_.'/../../nome da pasta do seu projeto que esta na pasta raiz do seu servidor /bootstrap/autoload.php'; /\* |-------------------------------------------------------------------------- | Turn On The Lights |-------------------------------------------------------------------------- | | We need to illuminate PHP development, so let us turn on the lights. | This bootstraps the framework and gets it ready for use, then it | will load up this application so that we can run it and send | the responses back to the browser and delight our users. | \*/ $app = require\_once \_\_DIR\_\_.'/../../nome da pasta do seu projeto que esta na pasta raiz do seu servidor/bootstrap/app.php'; /\* |-------------------------------------------------------------------------- | Run The Application |-------------------------------------------------------------------------- | | Once we have the application, we can handle the incoming request | through the kernel, and send the associated response back to | the client's browser allowing them to enjoy the creative | and wonderful application we have prepared for them. | \*/ $kernel = $app-\>make(Illuminate\Contracts\Http\Kernel::class); $response = $kernel-\>handle( $request = Illuminate\Http\Request::capture() ); $response-\>send(); $kernel-\>terminate($request, $response); Salve e seja feliz... Espero que ajude. Um abraço

---

_[View the full topic](https://forum.casadocodigo.com.br/t/deploy-aplicacao-laravel-5-1/295)._
