Skip to content

Commit 43fae62

Browse files
authored
Merge pull request #6296 from kenjis/improve-docs-server-config
docs: improve Web server config page
2 parents 4fc7078 + 7d92064 commit 43fae62

5 files changed

Lines changed: 33 additions & 1 deletion

File tree

user_guide_src/source/general/environments.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ The simplest method to set the variable is in your :doc:`.env file </general/con
4141

4242
> php spark env production
4343

44+
.. _environment-apache:
45+
4446
Apache
4547
------
4648

@@ -51,6 +53,9 @@ config using `SetEnv <https://httpd.apache.org/docs/2.2/mod/mod_env.html#setenv>
5153
5254
SetEnv CI_ENVIRONMENT development
5355
56+
57+
.. _environment-nginx:
58+
5459
nginx
5560
-----
5661

user_guide_src/source/general/urls.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ By default, the **index.php** file will be included in your URLs::
6060
If your server supports rewriting URLs you can easily remove this file with URL rewriting. This is handled differently
6161
by different servers, but we will show examples for the two most common web servers here.
6262

63+
.. _urls-remove-index-php-apache:
64+
6365
Apache Web Server
6466
-----------------
6567

@@ -81,6 +83,8 @@ request for your index.php file.
8183

8284
.. note:: Make sure to also exclude from the above rules any assets that you might need to be accessible from the outside world.
8385

86+
.. _urls-remove-index-php-nginx:
87+
8488
NGINX
8589
-----
8690

user_guide_src/source/installation/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ However you choose to install and run CodeIgniter4, the
2626
installing_composer
2727
installing_manual
2828
running
29+
troubleshooting
2930
../changelogs/index
3031
upgrading
31-
troubleshooting
3232
repositories

user_guide_src/source/installation/running.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ in the "AllowOverride" setting::
9999
Require all granted
100100
</Directory>
101101

102+
Removing the index.php
103+
----------------------
104+
105+
See :ref:`CodeIgniter URLs <urls-remove-index-php-apache>`.
106+
102107
Virtual Hosting
103108
---------------
104109

@@ -195,6 +200,11 @@ Be sure to specify options and permissions for the CodeIgniter public directory
195200
</Directory>
196201
</IfModule>
197202

203+
Setting Environment
204+
-------------------
205+
206+
See :ref:`Handling Multiple Environments <environment-apache>`.
207+
198208
Testing
199209
-------
200210

@@ -204,9 +214,13 @@ Apache needs to be restarted whenever you change its configuration.
204214

205215
Hosting with Nginx
206216
==================
217+
207218
Nginx is the second most widely used HTTP server for web hosting.
208219
Here you can find an example configuration using PHP 7.3 FPM (unix sockets) under Ubuntu Server.
209220

221+
default.conf
222+
------------
223+
210224
This configuration enables URLs without "index.php" in them and using CodeIgniter's "404 - File Not Found" for URLs ending with ".php".
211225

212226
.. code-block:: nginx
@@ -241,6 +255,11 @@ This configuration enables URLs without "index.php" in them and using CodeIgnite
241255
}
242256
}
243257
258+
Setting Environment
259+
-------------------
260+
261+
See :ref:`Handling Multiple Environments <environment-nginx>`.
262+
244263
Hosting with Vagrant
245264
====================
246265

user_guide_src/source/installation/troubleshooting.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ Troubleshooting
44

55
Here are some common installation problems, and suggested workarounds.
66

7+
.. contents::
8+
:local:
9+
:depth: 2
10+
711
How do I know if my install is working?
812
---------------------------------------
913

0 commit comments

Comments
 (0)