AtulHost
  • Business
    • Career and Education
    • Finance and Investments
    • Marketing Strategies
  • Productivity
  • Technology
    • Consumer Electronics
    • Solar Energy
  • Tutorials

How to fix “No Input File Specified” error?

By AtulHost in Tutorials ⋅ November 17th, 2020
Facebook Tweet LinkedIn

In a web server, let it be Apache or Nginx, if rewrite rules unable to touch the index file or root file, it shows an error of no input file specified.

To fix this error we just need to locate the root location or file.

For an instance, we have picked WordPress as a CMS which uses index.php file as it’s root file to serve the complete website.

Apache users can use the following code:

Below code must be added to the .htaccess file located in root directory.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

Usually Apache fix this issue by itself unless their is any permission issue. In some cases you just need to delete (after backing up) .htaccess file and hard reload the front end one, the required settings will be added automatically.

Nginx users can use the following code:

Nginx is not like Apache, we need to manually add the required directives.

Just edit the configuration file of your website and modify these settings:

server {
... rest of the config ...
    index index.php;
    root /var/www/html;
... rest of the config ...
}

In some complex setups you need to modify location blocks too. Just check them.

Once you have saved the changes just reload or restart the Nginx.

That is it. You’ve fixed the no input file specified error.

Content is tagged with apache, nginx, web server.
Facebook Tweet LinkedIn

You’ll also like:

  • Apache vs. Nginx: Selection of a Perfect Web Server
  • Shared vs. Virtual Private vs. Dedicated Servers
  • How to redirect 404 to homepage in Nginx?
  • How to install phpMyAdmin on Debian 10?
  • Nginx Performance Tuning
  • How to fix “Specify a Vary: Accept-Encoding Header” warning?
  • How to reduce initial server response time?
  • How to choose budget-friendly hosting service for WordPress?
  • NetworkError: Failed to execute ‘send’ on ‘XMLHttpRequest’
  • Is 100 Mbps internet enough for a server rack?

Published by AtulHost

Atul is a creative blogger who loves to do experiments with the latest business initiatives and tech trends like automation, artificial intelligence, cloud and edge computing, data science, hardware as well as networking, and the internet of things.

Make a comment Cancel reply

Required fields are asterisked and your email address will not be shared.

Subscribe

Recent Posts

  • Transitioning your startup out of the beginning stages
  • HR trends for 2021
  • How to pick the right financing company for your customers
  • How to reduce initial server response time?
  • What every ecommerce business needs to know when it comes to product images
  • What is shared hosting?
Taking care of communication within your small business
Best laptop brands
Cool business ideas

We serve cookies on this site to offer the excellent user service.

  • About
  • Contact
  • Privacy Policy
  • Terms and Conditions
  • Write for Us
This website and its content are copyrighted © 2014-2021 by atulhost.com and individual contributors.