Uh oh!
There was an error while loading. Please reload this page.
docs: improve "Hosting with Apache" - #7679
Conversation
kenjis
commented
Jul 8, 2023
The current doc says to set the document root to This is not good. https://codeigniter4.github.io/CodeIgniter4/installation/running.html#virtual-hosting |
kenjis
commented
Jul 8, 2023
Changed the location of the project folder: 3bab114 |
| ----------------- | ||
| Add a host alias in your "hosts" file, typically **/etc/hosts** on unix-type platforms, | ||
| or **c:/Windows/System32/drivers/etc/hosts** on Windows. |
There was a problem hiding this comment.
While you're here, these should be backslashes.
| <Directory "/opt/lamp/apache2/myproject/public"> | ||
| AllowOverride All | ||
| Require all granted |
There was a problem hiding this comment.
I don't think I've used this directive before. Is it necessary? Secure? Advised?
There was a problem hiding this comment.
Yes, it was documented:
If your project folder is not a subfolder of the Apache document root, then your
<VirtualHost>element may need a nested<Directory>element to grant the web server access to the files.
/opt/lamp/apache2/htdocs/myproject/public is in the main document root /opt/lamp/apache2/htdocs.
It is not good. So I moved it.
| # Apache >= 2.4: | ||
| Require all granted |
There was a problem hiding this comment.
Ah I see, it looks like this is a new approach. I trust you on this.
There was a problem hiding this comment.
What do you mean? The change here is simply a change in indentation.
Description
Checklist: