1

I have successfully uploaded all files of my laravel project to server, but it always displays 'page not found' error. the root directory donot have public_html folder. so i tried renaming public folder of laravel to public_html but it is still not working. It is still up and running in localhost.

update: moved all public directory files to root directory now got this error:

Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$'

Steve
  • 1,622
  • 5
  • 21
  • 39
  • Did you tried to up just one index.php file with only a "echo" to see if the server is working on this directory? – evandrobm May 28 '16 at 04:03
  • yes. i tried the url `../public/images/img.jpg` and it is displaying the image. – Steve May 28 '16 at 04:13

1 Answers1

0

You need to setup web server. Create a virtual host and set /yourLaravelProject/public directory as root. Restart web server.

Also, set correct permissions to a storage directory:

chmod -R 777 storage

After that I'd recommend to clear all Laravel cache:

php artisan cache:clear
php artisan route:clear
php artisan config:clear
php artisan view:clear

Usually after these steps Laravel app works as expected.

Community
  • 1
  • 1
Alexey Mezenin
  • 158,981
  • 26
  • 290
  • 279