0

in my hosting I have a few pages in folders inside of public_html.

So, I need upload a Laravel project in a new folder for access like this: "www.mypage.com/laravelproject". My problem is that I create a folder laravelproject and I put all the laravel project inside this, but give me:

Forbidden

You don't have permission to access /laravelproject/ on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

And if i try enter to: "www.mypage.com/laravelproject/public" I receive this error:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

The hosting give me this errors that produce the project. The project name is "eysa", so I want access it like: "www.mydomain.com/eysa":

[Thu Sep 14 14:31:54 2017] [alert] [client 190.19.102.99] /var/www/vhost/example.com/home/html/eysa/public/.htaccess: Option MultiViews not allowed here [Thu Sep 14 14:31:54 2017] [error] [client 190.19.102.99] File does not exist: /var/www/vhost/example.com/home/errors/500.html [Thu Sep 14 14:31:54 2017] [error] [client 190.19.102.99] File does not exist: /var/www/vhost/example.com/home/html/favicon.ico, referer: http://example.com/eysa/public [Thu Sep 14 14:31:54 2017] [error] [client 190.19.102.99] File does not exist: /var/www/vhost/example.com/home/errors/404.html, referer: http://example.com/eysa/public

I need help!

Thanks!

R. Rio
  • 35
  • 2
  • 6
  • 2
    What does your error log say? Apache error.log and laravel.log – fubar Sep 14 '17 at 02:10
  • Do you have access to ssh? – mwweb Sep 14 '17 at 02:14
  • @mwweb hi, the domain/hosting don't have ssh – R. Rio Sep 14 '17 at 02:15
  • The `public` directory should be the document root. The `Internal Server Error` is likely a config issue such as database connection etc. Check your log files. – GeorgeQ Sep 14 '17 at 02:20
  • @fubar hi, these logs are in my hosting? Or I can see it in my ftp? – R. Rio Sep 14 '17 at 02:20
  • some web hostings puts your log file into your root directory or under a folder called error_logs or something similar to that. Most likely something wrong with your web.config / .htaccess file – siniradam Sep 14 '17 at 02:22
  • @GeorgeQ hi, I contact to my hosting because they don't give me permissions to see error logs. When I have it, I post it. btw thanks for the help! – R. Rio Sep 14 '17 at 02:28
  • Hi @R.Rio, before planning to put a Laravel application in shared hosting, please take a proper research and read the guidelines on deploying it - such as [this](https://medium.com/laravel-news/the-simple-guide-to-deploy-laravel-5-application-on-shared-hosting-1a8d0aee923e). You will expose your configuration and credentials if you deploy it carelessly.. – Bagus Tesa Sep 14 '17 at 02:51
  • i think you need to create a folder "sampleProject" inside public_html then put your laravel app there and you can access it like www.mypage.com/sampleProject/public – Junaid Ahmad Sep 14 '17 at 06:40
  • @JunaidAhmad hi, i make this but return me: "500 Internal server error" – R. Rio Sep 14 '17 at 12:32
  • @siniradam hi, my hosting finally give me the error log. I edit the main post and I put it, can you take a look please? – R. Rio Sep 14 '17 at 12:39

1 Answers1

0

Ok, so let's tear down your log file

Here is your main problem your server configuration does not allow to use MultiViews, removing that from your .htaccess file probably should fix the issue.

[Thu Sep 14 14:31:54 2017] [alert] [client 190.19.102.99] /var/www/vhost/example.com/home/html/eysa/public/.htaccess: Option MultiViews not allowed here

Your server looking for your custom error page but cannot found, you can define yours in .htaccess as well ;

[Thu Sep 14 14:31:54 2017] [error] [client 190.19.102.99] File does not exist: /var/www/vhost/example.com/home/errors/500.html

Your browser tries to get favicon.ico but cannot be found in root.

[Thu Sep 14 14:31:54 2017] [error] [client 190.19.102.99] File does not exist: /var/www/vhost/example.com/home/html/favicon.ico, referer: http://example.com/eysa/public

This is also almost identical error with the one above, same comment applies.

[Thu Sep 14 14:31:54 2017] [error] [client 190.19.102.99] File does not exist: /var/www/vhost/example.com/home/errors/404.html, referer: http://example.com/eysa/public

Seems like your server only allows MultiViews on your root folder, if laravel requires this you can create a sub-domain or create a virtual folder if your hosting allows.

siniradam
  • 2,727
  • 26
  • 37