qburst/apache-config-generator ? reverse-engineered prompt

Reverse engineered prompt

Build me a small Django package that can generate an Apache virtual host config from a management command.

I want to add it to my Django project, run something like generate_apache_config, and then answer a few simple prompts for whether the site is name based or IP based, the server name or IP, the port, and whether I want https. If https is enabled, it should ask for the certificate, key, and optional chain file, plus the https port and whether to redirect http to https.

It should also detect the project settings for static and media paths and URLs, and warn me if those are missing before continuing. In the end it should write a .conf file in the project root using the project name, ready to copy into Apache sites available. If you need to, look up current Django management command patterns online so the command feels natural.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab