"/" route not displaying homepage, giving 403 forbidden Laravel 5 - php

I've deployed a test Laravel 5 application onto a development server.
The application is successfully installed but when I go to the domain that points to my application. It doesn't load the Laravel 5 homepage. Instead it gives me a 403 Forbidden Error.
I'm on an nginx server.

Possible problem is your server root is not pointing to public folder of your project, where index.php is located. Double-check your vhost configuration to be sure everything is fine.
Nginx access and error logs should help you with this. Also, check the same vhost on your local environment with development tools turned off.

Related

Htaccess giving 404 error on Aws Linux 2 AMI

I have set up an elastic beanstalk and deployed my application to it, the application has a .htaccess file in it. .htaccess works perfectly on my localhost but when checking it on the live server it gives back a 404 error.
For Example
I have a login file named login_1.php, on my .htaccess I've set the file to be called login.
When clicking the login link on my localhost it sends me to the login_1.php file with the URL name of login, but when clicking on the login link on the live server it takes me to a 404 error.
I've followed all instructions on the internet regarding this issue but nothing seems to solve the problem. I've changed AllowOverride None to AllowOverride All on my httpd.conf file. I do not have apache on my ec2 Linux 2 AMI instance so I can't restart apache.
Any help would be much appreciated to fix this.
Thanks,
Arnav
Figured out the answer, went into my elastic beanstalk application and changed the application type to APACHE instead of NGINX. This start httpd sever and allowed me to activate the .htaccess file in my application.

Application in IIS throws 404 page, which is a subfolder within the root folder

I have an application deployed at my client server which is Windows 2012 Server with IIS.
Within root folder there is a subfolder where the application is deployed,
which throws 404 error every once in a while, the application sticks to the same error until we restart the IIS server.
Main domain: www.domain.com
Subfolder within domain: www.domain.com/subfolder
The application resides in subfolder.
Application built with Codeigniter.
Thanks In Advance.

"Not Found" error for all other routes except for / using laravel 5.1 on a EC2 instance AWS

Trying to set up a laravel 5.1 project on EC2 (aws). I've so far installed a LAMP stack (php 5.6) and composer. It all seems to be working fine. Was even able to run migrations for the laravel app, But whenever I try to go to any route except '/' I get a
Not Found
The requested URL /public/pricing was not found on this server.
Apache/2.4.7 (Ubuntu) Server at compute.amazonaws.com Port 80
error.
Not sure whats going on. It works perfectly fine on my localhost using mamp.
Three things to consider;
1) you should set the document root to public not the Laravel directory. In simpler words, users should be be able to access the Laravel directory.
2) check out your Apache find files or .htaccess to allow for override
AllowOverride All
3) Make sure mode_rewrite is enabled
sudo a2enmod rewrite
So it sounds/looks like you are missing the htaccess file:
http://laravel.com/docs/5.1#configuration
If you navigate to /public/index.php?pricing, the webpage will most likely show up even now.
You will need to configure the .htaccess file to pass requests to index.php to handle the routing.
I enabled mod rewrite
Set up htaccess
AllowOverride All
It didn't change anything. I then killed the connection to the server and rebooted and everything was working. Not exactly sure why this worked but fortunately it did.

Laravel project on host server

I try to deploy my laravel project on host server. So I upload all files contains in my Laravel Project folder on my host server. But when I check with the url, I can't use my project like when I'm on my localhost. I have just the homepage and when I tried to access others pages the server return 404 not found.
I really have no idea what I should do ?
Any suggests, thanks !
There are several things to check while you work to resolve this issue:
Compatible Environments
If your host uses web server software (Apache, Nginx, etc) other than the one that you use in your development environment, check the Laravel documentation for information about configuration Laravel to run with your hosts's web server.
Routing
Ensure that you deployed your .htaccess file. This file lives in the public directory. It is responsible for mapping all of your URLs to the main Laravel router.
Deployed Files
Verify that all of your other files on the host server match the files in your development environment. It is not uncommon to miss files or entire directories when deploying a new project.
Logging
If your problem still is not resolved, get access to the host's log files and examine the errors that are logged when you try to access your site. You can often find a clue in the log files that will lead you to the specific problem.
Sounds like you've deployed it onto a non-apache webserver so .htaccess rewrites are not being used.
If its nginx then you need to add the following rewrites to your vhost configuration.
location / {
try_files $uri $uri/ /index.php?$query_string;
}
http://laravel.com/docs/4.2/installation#pretty-urls

Codeigniter on IIS web.config issue

I am installing a site made in PHP/CodeIgniter 2 on a hosting server which unfortunately has IIS running, which I have no experience in.
Nothing is working except the homepage, all other pages are returning 404 errors.
Adding index.php to the url returns 500 - Internal server error (I have the index page config set to '' in the config.php file)
I tried also creating a web.config file thinking the issue might be from the redirects, but adding a web.config file stops even the homepage from working, even if the web.config file added is completely empty.
Help really appreciated.
Check if the hosting server has Re-write module installed in it, that could be your problem.
Make sure you had installed URL Rewrite -
http://www.iis.net/downloads/microsoft/url-rewrite
After you had installed the module you should able to see this icon (URL Rewrite) in your IIS Management.

Categories