3 Commits

Author SHA1 Message Date
Ilia Ross
95c974edc4 Fix comments on skipped Apache conditionals
This patch fixes comments before skipped `IfModule`, `IfDefine`, and `IfVersion` blocks being attached to the next parsed directive.

For example:

```apache
# SSL-only settings
<IfModule mod_ssl.c>
    SSLEngine on
</IfModule>
ServerName example.test
```

When `mod_ssl` was unavailable, Webmin attached `# SSL-only settings` to `ServerName`. Deleting `ServerName` could then remove the wrong line and produce:

```apache
# SSL-only settings
<IfModule mod_ssl.c>
    SSLEngine on
```

This fix clears comments belonging to skipped conditionals. Deleting `ServerName` now leaves the complete `IfModule` block unchanged.
2026-09-20 17:22:17 +02:00
Ilia Ross
efe1dddca8 Fix to change Apache comments to use directive fields
https://github.com/webmin/webmin/pull/2847#issuecomment-5705632150
2026-09-17 01:46:50 +02:00
Ilia Ross
dcd929e7e3 Add Apache comment preservation
This PR fixes full-line comments being removed when Webmin rewrites Apache configuration blocks.
2026-09-17 00:07:52 +02:00