0

I'm trying to deploy a Laravel 5.6 app on a Debian 9 based VPS with Apache, but the server seem to be unable to handle the requests when i try to access the first page,and i keep having

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

I've already looked at this

Laravel htaccess Getting a 500 Internal Server Error on Laravel 5+ Ubuntu 14.04 https://www.howtoforge.com/tutorial/install-laravel-on-ubuntu-for-apache/

My .htaccess file that i placed inside the public folder

Options +FollowSymLinks
RewriteEngine On

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

The configuration file places inside /etc/apache/sites-available

<VirtualHost *:80>
    ServerName picodem.dev

    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html/picodem-project/public

    <Directory /var/www/html/picodem-project>
    Options Indexes Includes FollowSymLinks MultiViews
    AllowOverride AuthConfig FileInfo
    Order allow,deny
    Allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

I don't have a domain name yet, and the picodem.dev is just dummy, so i'm accessing the app via the Browser using the IP address of the VPS, but i'm still not sure what's causing the problem...

med.b
  • 465
  • 2
  • 12
  • 21
  • Is your live domain called `picodem.dev`? because your vhost has `ServerName picodem.dev` – Mihir Bhende Feb 15 '19 at 22:23
  • That's a dummy domain (fake) because i don't have one yet, so i'm trying to access the App using the server IP. could that be the cause of the issue ? – med.b Feb 16 '19 at 07:26
  • Yes that can be the issue. Also any error occurred on server level, you would be able to see it in /var/log/apache/error.log. Check this file and the error details should be there – Mihir Bhende Feb 16 '19 at 07:53
  • Have you tried placing that .htaccess file in the *root* of your project? I just went through this headache launching a Laravel 5.7 app on Azure linux. I also had to add URL::forceScheme('https'); to the bottom of my routes/web.php file – FullStackOfPancakes Feb 16 '19 at 19:26
  • RewriteEngine on RewriteCond %{REQUEST_URI} !^public RewriteRule ^(.*)$ public/$1 [L] <-- I used this – FullStackOfPancakes Feb 16 '19 at 19:27

0 Answers0