{"id":1511,"date":"2017-05-25T17:11:58","date_gmt":"2017-05-25T11:41:58","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=1511"},"modified":"2026-08-21T15:40:10","modified_gmt":"2026-08-21T10:10:10","slug":"codeigniter-404-error-nginx","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/codeigniter-404-error-nginx\/","title":{"rendered":"How to Fix CodeIgniter 404 Errors on Nginx"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>CodeIgniter applications may return a <strong>404 Not Found<\/strong> error when deployed on an Nginx web server, especially when accessing custom application URLs such as <code>\/login<\/code>, <code>\/admin<\/code>, or <code>\/dashboard<\/code>.<\/p>\n\n\n\n<p>The same application may work correctly on Apache because Apache commonly uses <code>.htaccess<\/code> rules for URL rewriting. Nginx does not process <code>.htaccess<\/code> files, so the rewrite rules need to be configured directly in the Nginx server configuration.<\/p>\n\n\n\n<p>In this guide, we will explain how to configure Nginx to correctly route CodeIgniter requests to <code>index.php<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p>Before proceeding, make sure the following requirements are met:<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>Nginx is installed and running on the Ubuntu\/Linux server.<\/li>\n\n\n\n<li>The CodeIgniter application has been deployed on the server.<\/li>\n\n\n\n<li>PHP and PHP-FPM are installed and running.<\/li>\n\n\n\n<li>You have <code>sudo<\/code> or root access to modify the Nginx configuration.<\/li>\n\n\n\n<li>The Nginx document root points to the correct CodeIgniter application directory.<\/li>\n\n\n\n<li>You know the PHP-FPM socket or upstream configuration used by Nginx.<\/li>\n<\/ol>\n\n\n\n<p>For CodeIgniter 4, the recommended document root is normally the application&#8217;s <code>public<\/code> directory.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Implementation<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Open the Nginx Configuration<\/h3>\n\n\n\n<p>Open the Nginx virtual host configuration for your application.<\/p>\n\n\n\n<p>For example:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo vi \/etc\/nginx\/sites-enabled\/default<\/pre>\n\n\n\n<p>If the application has its own virtual host configuration, edit that configuration instead.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Configure URL Rewriting<\/h3>\n\n\n\n<p>Inside the <code>server<\/code> block, add the following configuration:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">location \/ {\n    try_files $uri $uri\/ \/index.php?$query_string;\n}<\/pre>\n\n\n\n<p>The <code>try_files<\/code> directive tells Nginx to:<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>Check whether the requested file exists.<\/li>\n\n\n\n<li>Check whether the requested directory exists.<\/li>\n\n\n\n<li>If neither exists, forward the request to <code>index.php<\/code>.<\/li>\n\n\n\n<li>Pass the original query string to the CodeIgniter application.<\/li>\n<\/ol>\n\n\n\n<p>This allows CodeIgniter to process URLs such as:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/login\n\/admin\n\/dashboard<\/pre>\n\n\n\n<p>instead of Nginx returning a 404 error.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Configure PHP-FPM<\/h3>\n\n\n\n<p>Make sure PHP requests are passed to PHP-FPM.<\/p>\n\n\n\n<p>For example:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">location ~ \\.php$ {\n    include snippets\/fastcgi-php.conf;\n    fastcgi_pass unix:\/run\/php\/php8.3-fpm.sock;\n}<\/pre>\n\n\n\n<p>The PHP-FPM socket may be different depending on the PHP version installed on your server.<\/p>\n\n\n\n<p>You can check the available PHP-FPM sockets with:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">ls \/run\/php\/<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: CodeIgniter 4 Configuration<\/h3>\n\n\n\n<p>For CodeIgniter 4, the Nginx document root should normally point to the <code>public<\/code> directory:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">server {\n    listen 80;\n    server_name example.com;\n\n    root \/var\/www\/example.com\/public;\n    index index.php index.html;\n\n    location \/ {\n        try_files $uri $uri\/ \/index.php?$query_string;\n    }\n\n    location ~ \\.php$ {\n        include snippets\/fastcgi-php.conf;\n        fastcgi_pass unix:\/run\/php\/php8.3-fpm.sock;\n    }\n}<\/pre>\n\n\n\n<p>Replace the domain, application path, and PHP-FPM version according to your environment.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 5: Verify the Nginx Configuration<\/h3>\n\n\n\n<p>Before applying the configuration, check the Nginx syntax:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo nginx -t<\/pre>\n\n\n\n<p>If the configuration test is successful, reload Nginx:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo systemctl reload nginx<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 6: Test the Application<\/h3>\n\n\n\n<p>Open the CodeIgniter application in a browser and test routes such as:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">https:\/\/example.com\/login\nhttps:\/\/example.com\/admin\nhttps:\/\/example.com\/dashboard<\/pre>\n\n\n\n<p>The requests should now be handled by CodeIgniter instead of returning an Nginx 404 error.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">CodeIgniter Application in a Subdirectory<\/h3>\n\n\n\n<p>If the application is deployed under a subdirectory such as:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">https:\/\/example.com\/directory\/<\/pre>\n\n\n\n<p>the Nginx configuration can be adjusted as follows:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">location \/directory\/ {\n    try_files $uri $uri\/ \/directory\/index.php?$query_string;\n}<\/pre>\n\n\n\n<p>After making the change:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo nginx -t\nsudo systemctl reload nginx<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting<\/h2>\n\n\n\n<p>If the 404 error continues, check the following:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Check the Nginx Error Log<\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo tail -f \/var\/log\/nginx\/error.log<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Check PHP-FPM<\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo systemctl status php8.3-fpm<\/pre>\n\n\n\n<p>Replace <code>php8.3-fpm<\/code> with the PHP version installed on your server.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Verify the Application Files<\/h3>\n\n\n\n<p>For example:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">ls -la \/var\/www\/example.com\/<\/pre>\n\n\n\n<p>For CodeIgniter 4:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">ls -la \/var\/www\/example.com\/public\/<\/pre>\n\n\n\n<p>Also verify that <code>index.php<\/code> exists in the expected location.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>A CodeIgniter application can return 404 errors on Nginx when application routes are not correctly forwarded to the CodeIgniter front controller.<\/p>\n\n\n\n<p>The key Nginx configuration is:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">location \/ {\n    try_files $uri $uri\/ \/index.php?$query_string;\n}<\/pre>\n\n\n\n<p>After adding the configuration, always validate it using <code>nginx -t<\/code> and reload Nginx.<\/p>\n\n\n\n<p>For CodeIgniter 4, also ensure that the Nginx document root points to the application&#8217;s <code>public<\/code> directory.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Frequently Asked Questions<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. Why does CodeIgniter work on Apache but return 404 on Nginx?<\/h3>\n\n\n\n<p>Apache commonly uses <code>.htaccess<\/code> files for URL rewriting. Nginx does not process <code>.htaccess<\/code>, so equivalent rewrite behavior must be configured directly in the Nginx configuration.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. Why does <code>\/index.php\/login<\/code> work but <code>\/login<\/code> return 404?<\/h3>\n\n\n\n<p>This usually indicates that Nginx is not forwarding clean URLs to CodeIgniter&#8217;s <code>index.php<\/code>. The <code>try_files<\/code> directive is generally required to handle these requests.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Related Article <\/h2>\n\n\n\n<p><a href=\"https:\/\/pheonixsolutions.com\/blog\/install-nginx-php-mariadb-ubuntu-16-04-1\/\">Install Nginx, Php, MariaDB on Ubuntu 16.04.1<\/a><br><a href=\"https:\/\/pheonixsolutions.com\/blog\/install-nginx-php-fpm-mariadb-on-centos-7\/\">Install Nginx, PHP-fpm, Mariadb on Centos 7<\/a><br><a href=\"https:\/\/pheonixsolutions.com\/blog\/how-to-install-and-configure-php-with-nginx-on-centos7\/\">How to install and configure PHP with Nginx on centos7<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction CodeIgniter applications may return a 404 Not Found error when deployed on an Nginx web server, especially when accessing custom application URLs such as \/login, \/admin, or \/dashboard. The same application may work correctly on Apache because Apache commonly uses .htaccess rules for URL rewriting. Nginx does not process&hellip; <a href=\"https:\/\/pheonixsolutions.com\/blog\/codeigniter-404-error-nginx\/\" class=\"more-link read-more\" rel=\"bookmark\">Continue Reading <span class=\"screen-reader-text\">How to Fix CodeIgniter 404 Errors on Nginx<\/span><i class=\"fa fa-arrow-right\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[340,298],"tags":[341,271],"class_list":{"0":"post-1511","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-codeigniter","7":"category-nginx","8":"tag-codeigniter","9":"tag-nginx","10":"h-entry","12":"h-as-article"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Pheonix Solutions - We Empower Your Business Growth<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/pheonixsolutions.com\/blog\/codeigniter-404-error-nginx\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Pheonix Solutions - We Empower Your Business Growth\" \/>\n<meta property=\"og:description\" content=\"Introduction CodeIgniter applications may return a 404 Not Found error when deployed on an Nginx web server, especially when accessing custom application URLs such as \/login, \/admin, or \/dashboard. The same application may work correctly on Apache because Apache commonly uses .htaccess rules for URL rewriting. Nginx does not process&hellip; Continue Reading How to Fix CodeIgniter 404 Errors on Nginx\" \/>\n<meta property=\"og:url\" content=\"https:\/\/pheonixsolutions.com\/blog\/codeigniter-404-error-nginx\/\" \/>\n<meta property=\"og:site_name\" content=\"PHEONIXSOLUTIONS\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/PheonixSolutions-209942982759387\/\" \/>\n<meta property=\"article:published_time\" content=\"2017-05-25T11:41:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-08-21T10:10:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2016\/09\/PX2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"3837\" \/>\n\t<meta property=\"og:image:height\" content=\"2540\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@pheonixsolution\" \/>\n<meta name=\"twitter:site\" content=\"@pheonixsolution\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/codeigniter-404-error-nginx\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/codeigniter-404-error-nginx\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/0ffa33d73c869faec2d50e79c24e3503\"},\"headline\":\"How to Fix CodeIgniter 404 Errors on Nginx\",\"datePublished\":\"2017-05-25T11:41:58+00:00\",\"dateModified\":\"2026-08-21T10:10:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/codeigniter-404-error-nginx\\\/\"},\"wordCount\":571,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#organization\"},\"keywords\":[\"codeigniter\",\"Nginx\"],\"articleSection\":[\"Codeigniter\",\"Nginx\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/codeigniter-404-error-nginx\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/codeigniter-404-error-nginx\\\/\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/codeigniter-404-error-nginx\\\/\",\"name\":\"Pheonix Solutions - We Empower Your Business Growth\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#website\"},\"datePublished\":\"2017-05-25T11:41:58+00:00\",\"dateModified\":\"2026-08-21T10:10:10+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/codeigniter-404-error-nginx\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/codeigniter-404-error-nginx\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/codeigniter-404-error-nginx\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Fix CodeIgniter 404 Errors on Nginx\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/\",\"name\":\"Pheonix Solutions\",\"description\":\"We Empower Your Business Growth\",\"publisher\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#organization\",\"name\":\"PheonixSolutions\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/12\\\/logo.png\",\"contentUrl\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/12\\\/logo.png\",\"width\":454,\"height\":300,\"caption\":\"PheonixSolutions\"},\"image\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/PheonixSolutions-209942982759387\\\/\",\"https:\\\/\\\/x.com\\\/pheonixsolution\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/0ffa33d73c869faec2d50e79c24e3503\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/09bacc0294abee1322a23ab4bc6a0330dd4cb4df707dc9d0b0efeba6c109608b?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/09bacc0294abee1322a23ab4bc6a0330dd4cb4df707dc9d0b0efeba6c109608b?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/09bacc0294abee1322a23ab4bc6a0330dd4cb4df707dc9d0b0efeba6c109608b?s=96&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"http:\\\/\\\/pheonixsolutions.com\\\/blog\"],\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/author\\\/admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Pheonix Solutions - We Empower Your Business Growth","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/pheonixsolutions.com\/blog\/codeigniter-404-error-nginx\/","og_locale":"en_US","og_type":"article","og_title":"Pheonix Solutions - We Empower Your Business Growth","og_description":"Introduction CodeIgniter applications may return a 404 Not Found error when deployed on an Nginx web server, especially when accessing custom application URLs such as \/login, \/admin, or \/dashboard. The same application may work correctly on Apache because Apache commonly uses .htaccess rules for URL rewriting. Nginx does not process&hellip; Continue Reading How to Fix CodeIgniter 404 Errors on Nginx","og_url":"https:\/\/pheonixsolutions.com\/blog\/codeigniter-404-error-nginx\/","og_site_name":"PHEONIXSOLUTIONS","article_publisher":"https:\/\/www.facebook.com\/PheonixSolutions-209942982759387\/","article_published_time":"2017-05-25T11:41:58+00:00","article_modified_time":"2026-08-21T10:10:10+00:00","og_image":[{"width":3837,"height":2540,"url":"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2016\/09\/PX2.png","type":"image\/png"}],"author":"admin","twitter_card":"summary_large_image","twitter_creator":"@pheonixsolution","twitter_site":"@pheonixsolution","twitter_misc":{"Written by":"admin","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/pheonixsolutions.com\/blog\/codeigniter-404-error-nginx\/#article","isPartOf":{"@id":"https:\/\/pheonixsolutions.com\/blog\/codeigniter-404-error-nginx\/"},"author":{"name":"admin","@id":"https:\/\/pheonixsolutions.com\/blog\/#\/schema\/person\/0ffa33d73c869faec2d50e79c24e3503"},"headline":"How to Fix CodeIgniter 404 Errors on Nginx","datePublished":"2017-05-25T11:41:58+00:00","dateModified":"2026-08-21T10:10:10+00:00","mainEntityOfPage":{"@id":"https:\/\/pheonixsolutions.com\/blog\/codeigniter-404-error-nginx\/"},"wordCount":571,"commentCount":0,"publisher":{"@id":"https:\/\/pheonixsolutions.com\/blog\/#organization"},"keywords":["codeigniter","Nginx"],"articleSection":["Codeigniter","Nginx"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/pheonixsolutions.com\/blog\/codeigniter-404-error-nginx\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/pheonixsolutions.com\/blog\/codeigniter-404-error-nginx\/","url":"https:\/\/pheonixsolutions.com\/blog\/codeigniter-404-error-nginx\/","name":"Pheonix Solutions - We Empower Your Business Growth","isPartOf":{"@id":"https:\/\/pheonixsolutions.com\/blog\/#website"},"datePublished":"2017-05-25T11:41:58+00:00","dateModified":"2026-08-21T10:10:10+00:00","breadcrumb":{"@id":"https:\/\/pheonixsolutions.com\/blog\/codeigniter-404-error-nginx\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/pheonixsolutions.com\/blog\/codeigniter-404-error-nginx\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/pheonixsolutions.com\/blog\/codeigniter-404-error-nginx\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/pheonixsolutions.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Fix CodeIgniter 404 Errors on Nginx"}]},{"@type":"WebSite","@id":"https:\/\/pheonixsolutions.com\/blog\/#website","url":"https:\/\/pheonixsolutions.com\/blog\/","name":"Pheonix Solutions","description":"We Empower Your Business Growth","publisher":{"@id":"https:\/\/pheonixsolutions.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/pheonixsolutions.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/pheonixsolutions.com\/blog\/#organization","name":"PheonixSolutions","url":"https:\/\/pheonixsolutions.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/pheonixsolutions.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2016\/12\/logo.png","contentUrl":"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2016\/12\/logo.png","width":454,"height":300,"caption":"PheonixSolutions"},"image":{"@id":"https:\/\/pheonixsolutions.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/PheonixSolutions-209942982759387\/","https:\/\/x.com\/pheonixsolution"]},{"@type":"Person","@id":"https:\/\/pheonixsolutions.com\/blog\/#\/schema\/person\/0ffa33d73c869faec2d50e79c24e3503","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/09bacc0294abee1322a23ab4bc6a0330dd4cb4df707dc9d0b0efeba6c109608b?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/09bacc0294abee1322a23ab4bc6a0330dd4cb4df707dc9d0b0efeba6c109608b?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/09bacc0294abee1322a23ab4bc6a0330dd4cb4df707dc9d0b0efeba6c109608b?s=96&r=g","caption":"admin"},"sameAs":["http:\/\/pheonixsolutions.com\/blog"],"url":"https:\/\/pheonixsolutions.com\/blog\/author\/admin\/"}]}},"jetpack_shortlink":"https:\/\/wp.me\/p7F4uM-on","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1511","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=1511"}],"version-history":[{"count":2,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1511\/revisions"}],"predecessor-version":[{"id":10961,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1511\/revisions\/10961"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=1511"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=1511"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=1511"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}