-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: improve "Hosting with Apache" #7679
Conversation
The current doc says to set the document root to This is not good.
https://codeigniter4.github.io/CodeIgniter4/installation/running.html#virtual-hosting |
Changed the location of the project folder: 3bab114 |
|
||
LoadModule vhost_alias_module modules/mod_vhost_alias.so | ||
|
||
Adding Host Alias | ||
----------------- | ||
|
||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While you're here, these should be backslashes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! Fixed.
|
||
<Directory "/opt/lamp/apache2/myproject/public"> | ||
AllowOverride All | ||
Require all granted |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think I've used this directive before. Is it necessary? Secure? Advised?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see, it looks like this is a new approach. I trust you on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean? The change here is simply a change in indentation.
3bab114
to
45165e1
Compare
Description
Checklist: