I have made a website with Laravel 5.2 and now want to put it in my VPS. I installed LAMP on my server, and put my project in /www/ directory. I can access my server, however, when I try to access /public, I get an HTTP 500 error. Both my /bootstrap/cache and /storage are writable. Do you have any suggestions, what should I do? Thanks for your help!
Sorry, just made a mistake on changing rights of bootstrap and storage folders... Very sorry... Everything works now!
Related
I got a project for some enhancement which is running on CakePHP 2.9.
which is a ERP for govt Hospitals, i need work on admin panel for some enhancements.
I copied the project folder in localhost
/var/www/html/
and already imported schema into my phpmyadmin named esic.
and then i configured my esic/app/config/database.php file to the database(esic).
When I'm accessing the project from localhost, it is showing an error.
localhost/esic/
Internal Server Error The server encountered an internal error or
misconfiguration and was unable to complete your request.
Please contact the server administrator at webmaster#localhost to
inform them of the time this error occurred, and the actions you
performed just before this error.
More information about this error may be available in the server error
log.
I read the issue on Google and CakePHP official site but I didn't understand anything.
Please help me to figure out this problem.
Please let me know if some other details required.
Note: All other projects are working fine.
500 internal server occurs when the desired file or URL is not accessible.
AS you said all other projects are running on your localhost then please check that your .htaccess file is correct on this project.
Or else check other URL of the project.
Link: https://book.cakephp.org/2.0/en/installation/url-rewriting.html
If you are using linux environment try maybe only the permission of the folder. I somehow encounter that problem.
sudo chmod -R 755 /var/www/html/esic
or
sudo chmod -R 777 /var/www/html/esic
Am trying to run symfony on the Cpanel in the public_html. But when I access app_dev.php page it shows me 500 Internal Server error. I tried all method which are available on internet. I did same thing on the localhost but it is working on the localhost on the port 8000. But not working on the Cpanel. finding some solution
first of all, you can't browse app_dev.php except localhost, for this you have to add your public IP in app_dev.php
check app_dev.php line 13
clear cache and check permission for cache logs and session.if it's not solved your problem then
just check Symfony log file, this will tell everything you need....
and one more thing after placing your file in public_html your URL should be youdomain.com/web
if you want to remove web from your url try this....
shared hosting .htaccess for symfony
This is the permission problem. whenever you face this error please change the /username/public_html/web folder permission to 755 and app_dev.php -> 644 ,config.php -> 644 and app.php -> 644.
I am trying to deploy the symfony app on heroku and I am able to update the schema and all perfectly fine however when i try to access the site I get
Forbidden
You don't have permission to access / on this server.
So using the command heroku logs --num 10 i can see the error
Cannot serve directory /app/web/: No matching DirectoryIndex
(index.php,index.html,index.htm) found, and server-generated directory
index forbidden by Options directive
As you can see heroku is trying to access /app/web/ rather than just web, because of this even my assets are being access via app/web/css which is ofcourse wrong.
So how can i get rid of this app? I do not understand why Heroku is even pointing at that.
I have gone through the steps mentioned in Symfony documentation over and over and I cant seem to find out what I am missing?
The Procfile seems to be point to web so where is this app coming from?
web: vendor/bin/heroku-php-apache2 web/
I have gone through other articles online like the one as following but nothing seems to be fixing my problem.
Symfony on Heroku: 403 Forbidden You don't have permission to access / on this server
Any help will be really appreciated.
On Heroku you need to create the .Procfile and upload that or create the app.json Schema file and then based on that Heroku will create the .Procfile for you automatically, here you can see the app.json example for Symfony app.
Another thing that needs to be crossed checked is make sure in your public directory the .htaccess file was also uploaded. In Symfony the public directory is the web folder and in my case the .htaccess file was missing.
After making sure of the above two steps my app works perfectly fine on Heroku.
Use /web/ instead of web/: add the leading slash!
Your Procfile file should contain this:
web: vendor/bin/heroku-php-apache2 /web/
Note the leading / in the path to the web folder!
I developed a website in laravel and uploaded to web server. I uploaded all the files and folders into the root directory and the files of public folder to public_html. Now when I type the URL to my browser the home page works fine but my other routes are showing
Not Found
The requested URL /schedules was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
In the laravel documentation, I found that "Directories within the storage and the bootstrap/cache directories should be writable by your web server or Laravel will not run."
Is it the reason for this. If yes then how can I do this?
Since your new hosting/server is running Apache, make sure you copied .htaccess
I installed Laravel 5 by it's installer and I'm facing a issue with 500 error. I changed chmod with no change (755 for root and o+w for storage).
Running server with php -S localhost:8888 ~/bloggy/public
I have no idea what is doing this.
I think you must run Laravel in the root folder (/bloggy) and not in /public, because in the Laravel File Structure, the public folder is used by Laravel to read assets, css, javascript and other files that you could pass to the view by Laravel helper.
I encounter the same problem. Every request I made it gave me
Server unable to handle request in laravel 5.
I got this error because I configure auth.php and made some mistake in auth.php. I restored auth.php to its original and this fixed my problem.
Hope this helps. Cheers