skip to Main Content

Hie, I am trying to host a Laravel project on a VPS server with Cpanel. I am getting the No input file Specified error when I access the site.

Things I did so far>

Got Managed VPS hosting from inmotionhosting.
Got into root and downloaded the laravel project on var/www/html.
Got a domain name point at the server’s Ip address using A.
Changed the virtual host file servername and alias to the domain name keeping the ip address on the top as shown below:

 <VirtualHost ipaddress:80>
 ServerName mydomain.com
 ServerAlias www.domain.com
 DocumentRoot var/www/html/laravel/public
</virtualhost>

Now when I access the domain it returns No input file Specified error. I am not sure how to change the .htaccess to get this working, I believe it is something to do with the server .htaccess. I did fiddle around for quite a bit but a no vain so I had to turn to stackoverflow.

Adittionaly I changed my html folder permission and ownership to apache, tested with 755 777, tested with different user name no luck.

Not using vagrant or homestead or forge , Any suggestions

2

Answers


  1. I had a similar issue. While I also edited the Apache configuration and it didn’t work, since for me it was PHP-FPM.

    For some reason the document root was not changed in /opt/cpanel/ea-php72/root/etc/php-fpm.d/{my-domain-name-here}.conf.

    Correcting the document root here is what did the trick. So if you have a PHP-FPM configuration.

    Check the document root specified there as well and then restart the FPM service.

    You might run this command to restart FPM service:

    /scripts/restartsrv_apache_php_fpm
    
    Login or Signup to reply.
  2. Also don’t forget to restart php-fpm service after changing document root,.

    In my using in my case was:

    systemctl restart ea-php72-php-fpm.service
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search