Problem when placing Application made in Laravel 5.2 in production

Asked

Viewed 358 times

2

I’m not putting my system into production. I created a Virtualhost in the file http.conf Apache with the following configuration:

<VirtualHost *:80>
DocumentRoot /var/www/html/dna/public
ServerName www.dna.com
<Directory "/var/www/html/dna/public">
       Options Indexes FollowSymLinks Includes ExecCGI
       AllowOverride All
       Require all granted
   </Directory>
</VirtualHost>

When I access the address www.dna.com the home page appears normally, but when I try to login appears erro 500:

inserir a descrição da imagem aqui

The archive .htaccess of the briefcase /public of the project:

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews
    </IfModule>

    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}]
</IfModule>
  • What directory is this . htaccess in? Are you sure the path is right?

  • That code belongs to no one .htaccess. Is in the httpd.apache conf

  • Ha ok, when I put an Laravel in production I do a . htaccess in the root folder

  • I edited the question and put . htaccess from the public folder. If it’s another file you make, could you give me an example?

  • I’ll put in the answer to get better formatted, if it doesn’t help I withdraw

  • And if you access www.dna.com/public?

  • It says the public folder doesn’t exist

  • Set up the file hosts?

  • yes, the problem happens from the system homepage forward

Show 4 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.