Laravel Configuration for web server - php

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

Related

Laravel Godaddy hosting: View not Found [Works locally]

I am trying to deploy a Laravel app onto godaddy shared hosting. And have tried several solutions mentioned on this site and others, such as:
-Hosted Laravel 5.4 App shows "View [path.to.viewfile] not found."
-View [auth.login] not found at Shared Hosting Godaddy
However, my views still cannot be found, for some unknown reason that I cannot tell. I have tried the solutions mentioned here, but to no avail.
I checked the spelling of the views since Linux server is case sensitive.
the specific error can be viewed at : auctionSalvages.com
but in short::: View [simpleComponents.HeaderComponents.MainHeader] not found. (View: /home/hostname/AutoShop/resources/views/layouts/main.blade.php)
I have now successfully executed the following php artisan commands: clear-compiled,cache:clear,config:clear,route:clear and view:clear on the server through ssh.
but my view still returns above error..
any more ideas???
This may be a few years too late but here a few things you need to consider if this happened.
Make sure that all the files in the Public folder of your app is copied into the public_html folder of your godaddy hosting site. Make sure that the Settings in your cPanel File Manager (which is generally at the upper right corner) that Show Hidden Files (dotfiles) is checked.
Make sure the you have the .htaccess file in your public_html folder with the correct permissions.
Typically, when you transfer files into your hosting site, you do so by uploading a zip file and then extracting the zip file in the root directory of your site.
And then, when you copy the files from the Public folder of your app, you generally just Select All > Copy > Select public_html
However, sometimes, the files in your Public folder are hidden so you have to set the settings to Show Hidden File (dotfiles) to checked.

asp.net virtual directory in php website

I have created an asp.net virtual directory in php website.
Used IIS to host php website.
But when I try to access the virtual directory, I get 404.
Following is the folder structure
--wwwroot
--php website files
--asp.net web application
Set ASP.Net extention to 4.0 (Integrated Pipeline).
Give read and write permission to the virtual directory.
Not sure what causes 404.

Symfony deployment on heroku points to app folder

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!

Codigniter is not working after uploading to Linux server

Created an application using Codeginiter and is working fine with my local environment which is in XAMPP.
After uploading application folders and files to linux server application is not working at all.
Deployed complete files under "/var/www/html/" and when access from browser it gives me CI error as "404 Page Not Found".
After uploading, I have updated .htaccess file.
I think this is about Linux file permission. You might want to check its file permission.
try to change the permission to read, write and executed by you ONLY example:
sudo chmod 700 var/www/html

Access forbidden in linux mint for apache localhost

I am doing PHP development using Linux OS ,Lampp Apache server.I changed the default root folder htdocs to another folder PHP on my desktop. When I create a hello.php file in the folder ,I can see it in browser and works well.
But I have another folder inside this root folder called 'front_end'.When I try to see it in browser using http://localhost/front_end ,i get access forbidden.
Firebug shows 'Access forbidden'
How can I get access to this folder using localhost?
Another user asked a similar question on stackoverflow ,but it didn't help.
Ubuntu/Apache2/ Forbidden/Permission error
Assuming you have followed the advice regarding the file permissions.
Have you got an index.php file in the front_end directory?
If not that may be why you get 'Access forbidden'. See Apache 403 Forbidden Error and Solution Try accessing the spesific php file in the directory e.g. /front_end/test.php
Permissions on the folder
Check the permissions of the folder.
Use sudo to create the folders.

Categories