i got error 404 not found on laravel 5.2 after i deployed my project on ubuntu server 16.04
i gave permission to storage and too i created virtual host and its directory on public folder of my project
Not Found
The requested URL /login was not found on this server.
Apache/2.4.18 (Ubuntu) Server at www.xxx.com Port 80
the laravel home page show but nothing work like login and register
i got the answer
you should run this on server:
a2enmod rewrite
that worked perfectly! xD
Related
I'm getting a 502 Bad Gateway nginx/1.17.10 error when trying to visit a Laravel .test site with Valet. I'm having no issues with another Laravel app running on .test. I have tried reinstalling nginx, php, valet, and have tried using php versions 7.2 ,7.3 & 7.4 for valet. Any ideas?
For anyone still experiencing this issue:
Open your Homestead.yaml file
Add the following lines to the sites option:
php: YOUR_PHP_VERSION
type: apache
Run the command vagrant reload --provision
When installing nginx to use it with my laravel project, I believe that the routes do not work, it indicates the following error: 404 Not Found when trying to enter: http://127.0.0.1/project/public/login.
nginx.conf
This question is on AWS Laravel Implementation on Apache + mySQL AWS EC2 instance.
After copying the working Laravel folder from xampp/htdocs/my_project_name, migration to create tables in mySQL database and seeder are working.
However, I could not connect to my APIs using Postman. (404 not found)
I following these solution links
laravel the requested url was not found on this server
https://laracasts.com/discuss/channels/general-discussion/laravel-5-the-requested-url-was-not-found-on-this-server
I managed to modify the httpd.conf. However, I could not find file .htaccess
(
where .htacces i can find? Sorry for stupid question, but i can't find :) – MilanNz Mar 11 '15 at 12:30
#MilanNz The .htaccess can be found in the public directory of your application. However the code from this answer goes inside a vhost file. The location of that depends on your server. (e.g. for apache2 and unix it's usually at /etc/apache2/sites-available)
)
Also, I was not able to reboot my Apache using "service apache2 restart".
So I "sudo reboot"ed the EC2 instance and reconnected using Postman, the API urls were still not found.
There is a possibility that my URL is wrong. So I attach it here:
The URL used is http://ec2-??-??-???-??.us-east-2.compute.amazonaws.com/my_project_name/public/api/resultCRUD/list
The working xampp URL is http://localhost/my_project_name/public/api/resultCRUD/list
The Laravel project folder is located at /var/www/html/my_project_name on AWS EC2.
http://ec2-??-??-???-??.us-east-2.compute.amazonaws.com/phpinfo.php and
http://ec2-??-??-???-??.us-east-2.compute.amazonaws.com/phpMyAdmin/ are working.
Any help is greatly appreciated. Thanks!
It's finally working.
The reason I was stuck is because most of the answers are for ubuntu while I am using RedHat.
For RedHat EC2 instance, need first change the content of /etc/httpd/conf/httpd.conf following https://pinecode.io/article/setting-up-laravel-56-on-aws-linux,
In this step, I actually changed all "AllowOverride None"s to "AllowOverride All" instead of only line 151 of httpd.conf.
Then need to restart httpd using sudo service httpd restart
following https://gistpages.com/posts/enable_mod_rewrite_in_apache2_on_red_hat_linux
Then it is working all fine.
I didn't restart my apache service after saving changes to httpd.conf when I was asking this question.
I am trying to host my laravel 5.2 project on a CENTOS Server (Shared Hosting) I followed this tutorial
https://medium.com/laravel-news/the-simple-guide-to-deploy-laravel-5-application-on-shared-hosting-1a8d0aee923e
but when I try running it on online I get a blank page.
I checked my log I got this error
AH01276: Cannot serve directory /var/www/html: No matching DirectoryIndex (index.html,index.php,index.php) found, and server-generated directory index forbidden by Options directive
I then followed this http://www.liquidweb.com/kb/apache-error-no-matching-directoryindex-index-html-found-solved/ to solve that but I still keep getting a blank page with the same error in the log.
Please any help will be so much appreciated.
Thanks in advance.
You should point web server to a public directory inside Laravel project directory, not to it's root.
I had to redirect apache in the host file to the project folder
I have successfully install the laravel 5 using Wamp server & successfully created first project with name "myfirstproject".
enter image description here
enter image description here
Problem is that when i try to access "myfirstproject" through "localhost/myfirstproject"
it says
"Not Found
The requested URL /myfirstproject/ was not found on this server.
Apache/2.4.17 (Win64) PHP/5.6.16 Server at localhost Port 80"
And in localhost "myfirstproject" is in the list of My Projects.
okey so laravel has nothing to do with wampserver you are just using php, you have to open your cmd then then cd /the directory of your project,Then Type php artisan serve ,if everything ok the server will start .
access your project this way
localhost:8000/
if everything ok you should get a Laravel page
you should write command line at your project directory
php artisan serve