-
Notifications
You must be signed in to change notification settings - Fork 3
Make wwwroot dynamic based on request #17
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
Conversation
- This enhancement was suggested by Emiliano Vavassori (@syntaxerrormmm).
|
@syntaxerrormmm I would like to merge this change you proposed in #13 but your pull request conflicts with @stephdl last changes so I created a new one based on it so as to introduce your idea. Is anything else you would like to add? |
- Previously, it was possible to change the alias use to refer the moodle application by setting the 'path' property to moodle's database configuration. However, when doing so, there was no validation about how the path value should look like. This update changes the path declaration to introduce a path validator as suggested by @stephdl.
- Previously, the path validator didn't work becasue a wrong writing construction (from myself). This update changes the config.php 10base template to use Perl's one-line-if-statement which seems to do the expected validation (i.e., allowing the db configuration value of path property when it isn't a dot or a slash). - Previously, the dot and the slash were not scaped so this prevented the validator from working as expected. Both special charactes were scaped in order to represent their literal value.
|
I'm not sure that your code is good, I have had some warnings when I expanded the template, for now we just need this modification like @syntaxerrormmm proposed I thought for the moment we don't need the validator but it could be nice that the solution of @syntaxerrormmm could be implemented |
- Previously, it wasn't possible to choose between alias-like and virtualhost-like configuraitons. This update changes nethserver-moodle to allow the adminsitrator to choose between these sort of configurations by using db configuration tool once the moodle package has been installed and the web interface configuration finished. - Update README.rst documentation to better describe the changes.
|
@stephdl thanks for noticing this issue. The commit ee2d94e should fix it and also add a way to alternate between alias-like and virtualhost-like configuration using db configuration tool. So for wwwroot to be more dynamic. The README.rst file was also updated to describe these changes. Reviews and tests are needed. |
- Add semicolons at the end of db configuration commands. - Remove rst markup :: characters from db configuration commands.
|
https://github.com/areguera/nethserver-moodle/pull/17/files#diff-fb7661a599a679beb1865771f38297f0 this code should be in the createlinks, in rare case you might need to expand manually, but the good habit is to expand your template ion the createlinks event_templates("nethserver-moodle-update", qw( here we expand all this templates on nethserver-moodle-update which is triggered after the rpm installation |
|
Nice code @areguera, specially in the dashboard :), I suppose you work in IT or even you are a developer ???? I was yesterday also working on the virtualhost, and I noticed something wrong also in my code I don't know why but we must write the full path to the ssl certificate in the virtualhost, I was worked on this last night, and I found the same issue. my concern is this is something valuable when we use this certificate, but what about when another certificate will be in use. EDIT: we can retrieve the good path to the the ssl certificate we must also expand the template following the event 'certificate-update' in the createlink add or not tested with letsencrypt |
|
the documentation to the createlinks http://wiki.nethserver.org/doku.php?id=esmith:build:createlinks |
|
http://community.nethserver.org/t/moodle-virtualhost-and-letsencrypt/5138 if letsencrypt is set as the default certificate we can retrieve also with the code |
- The createlink file already contains lines for expanding both moodle.conf and config.php files when the nethserver-moodle-update command is executed. There is no need to expand-template twice by setting it at nethserver-moodle-conf file. So this update changes nethserver-moodle-conf file to remove expand-template commands from it.
- Previously, both SSL certificate and SSL key in moodle.conf template were specified using the default certificate absolute path. As consequence, when a different certificate and key were set in NethServer configuration database, they were not apply. This update changes the moodle.conf template to retrieve both SSL certificate and SSL key based on NethServer configuration database. When database values aren't set, the default certificate and key values are used instead.
- Previously, certificate-related actions were not included in the createlinks file. As consequence, when new certificate files were set in the configuration database, the template files including references to them didn't point to the correct certificate information. This update changes the createlinks file to re-expand the /etc/httpd/conf.d/moodle.conf file when certificate-related actions are triggered. - Reorder action blocks by similar meaning.
Thanks @stephdl . It's motivating to hear that from the experts :)
I administer small LANs and, from time to time, write scripts to automate tasks on them. What do you think about merging the changes committed so far? |
I'm fetching your branch for real tests with a rpm |
|
see my last commits in #18 normally you can apply this MR and after my MR... |
(@syntaxerrormmm).