Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions user_guide_src/source/general/environments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ config using `SetEnv <https://httpd.apache.org/docs/2.4/mod/mod_env.html#setenv>

.. _environment-nginx:

Nginx
nginx
-----

Under Nginx, you must pass the environment variable through the ``fastcgi_params``
Under nginx, you must pass the environment variable through the ``fastcgi_params``
in order for it to show up under the ``$_SERVER`` variable. This allows it to work on the
virtual-host level, instead of using `env` to set it for the entire server, though that
would work fine on a dedicated server. You would then modify your server config to something
Expand All @@ -97,7 +97,7 @@ like:
}
}

Alternative methods are available for Nginx and other servers, or you can
Alternative methods are available for nginx and other servers, or you can
remove this logic entirely and set the constant based on the server's IP address
(for instance).

Expand Down
6 changes: 3 additions & 3 deletions user_guide_src/source/general/urls.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Query page=2
Removing the index.php file
===========================

By default, the **index.php** file will be included in your URLs::
When you use Apache Web Server, by default, the **index.php** file will be needed in your URLs::

example.com/index.php/news/article/my_article

Expand Down Expand Up @@ -95,10 +95,10 @@ request for your index.php file.

.. _urls-remove-index-php-nginx:

NGINX
nginx
-----

Under NGINX, you can define a location block and use the ``try_files`` directive to get the same effect as we did with
Under nginx, you can define a location block and use the ``try_files`` directive to get the same effect as we did with
the above Apache configuration:

.. code-block:: nginx
Expand Down
62 changes: 42 additions & 20 deletions user_guide_src/source/installation/running.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,31 +25,53 @@ section of the User Guide to begin learning how to build dynamic PHP application
Initial Configuration
*********************

#. Open the **app/Config/App.php** file with a text editor and
set your base URL to ``$baseURL``. If you need more flexibility, the baseURL may
be set within the :ref:`.env <dotenv-file>` file as ``app.baseURL = 'http://example.com/'``.
(Always use a trailing slash on your base URL!)
Configure for Your Site URIs
============================

Open the **app/Config/App.php** file with a text editor.

#. $baseURL
Set your base URL to ``$baseURL``. If you need more flexibility, the baseURL may
be set within the :ref:`.env <dotenv-file>` file as ``app.baseURL = 'http://example.com/'``.
**Always use a trailing slash on your base URL!**

.. note:: If you don't set the ``baseURL`` correctly, in development mode,
the debug toolbar may not load properly and web pages may take considerably
longer to display.

#. If you intend to use a database, open the
**app/Config/Database.php** file with a text editor and set your
database settings. Alternately, these could be set in your **.env** file.
#. If it is not on the production server, set ``CI_ENVIRONMENT`` to ``development``
in **.env** file to take advantage of the debugging tools provided. See
:ref:`setting-development-mode` for the detail.
#. $indexPage
If you don't want to include **index.php** in your site URIs, set ``$indexPage`` to ``''``.
The setting will be used when the framework generates your site URIs.

.. note:: You may need to configure your web server to access your site with a URL
that does not contain **index.php**. See :ref:`CodeIgniter URLs <urls-remove-index-php>`.

Configure Database Connection Settings
======================================

If you intend to use a database, open the
**app/Config/Database.php** file with a text editor and set your
database settings. Alternately, these could be set in your **.env** file.

Set to Development Mode
=======================

If it is not on the production server, set ``CI_ENVIRONMENT`` to ``development``
in **.env** file to take advantage of the debugging tools provided. See
:ref:`setting-development-mode` for the detail.

.. important:: In production environments, you should disable error display and
any other development-only functionality. In CodeIgniter, this can be done
by setting the environment to "production". By default, the application will
run using the "production" environment. See also :ref:`environment-constant`.

.. important:: In production environments, you should disable error display and
any other development-only functionality. In CodeIgniter, this can be done
by setting the environment to "production". By default, the application will
run using the "production" environment. See also :ref:`environment-constant`.
Set Writable Folder Permission
==============================

.. note:: If you will be running your site using a web server (e.g., Apache or Nginx),
you will need to modify the permissions for the **writable** folder inside
your project, so that it is writable by the user or account used by your
web server.
If you will be running your site using a web server (e.g., Apache or nginx),
you will need to modify the permissions for the **writable** folder inside
your project, so that it is writable by the user or account used by your
web server.

************************
Local Development Server
Expand Down Expand Up @@ -355,10 +377,10 @@ Setting Environment
See :ref:`Handling Multiple Environments <environment-apache>`.

******************
Hosting with Nginx
Hosting with nginx
******************

Nginx is the second most widely used HTTP server for web hosting.
nginx is the second most widely used HTTP server for web hosting.
Here you can find an example configuration using PHP 8.1 FPM (unix sockets) under Ubuntu Server.

default.conf
Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/tutorial/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Running Development Server
==========================

With that out of the way it's time to view your application in a browser. You can
serve it through any server of your choice, Apache, Nginx, etc, but CodeIgniter
serve it through any server of your choice, Apache, nginx, etc, but CodeIgniter
comes with a simple command that takes advantage of PHP's built-in server to get
you up and running fast on your development machines. Type the following on the
command line from the root of your project:
Expand Down