[128] | 1 | /* $Id: genconf.c 161 2024-09-25 13:35:04Z nishi $ */
|
---|
| 2 |
|
---|
| 3 | #include "../config.h"
|
---|
| 4 |
|
---|
| 5 | #include <stdio.h>
|
---|
| 6 |
|
---|
[129] | 7 | int main(int argc, char** argv) {
|
---|
[131] | 8 | if(argc < 4) {
|
---|
[128] | 9 | return 1;
|
---|
| 10 | }
|
---|
| 11 | printf("##\n");
|
---|
| 12 | printf("## tewi.conf -- Tewi HTTPd configuration file\n");
|
---|
| 13 | printf("##\n");
|
---|
| 14 | printf("\n");
|
---|
| 15 | printf("# This configuration file is auto-generated.\n");
|
---|
| 16 | printf("\n");
|
---|
| 17 | printf("ServerRoot %s\n", argv[1]);
|
---|
| 18 | printf("\n");
|
---|
| 19 | printf("ServerAdmin %s\n", SERVER_ADMIN);
|
---|
| 20 | printf("\n");
|
---|
[132] | 21 | printf("#LoadModule %s/mod_cgi.%s\n", argv[2], argv[3]);
|
---|
[131] | 22 | printf("#LoadModule %s/mod_proxy.%s\n", argv[2], argv[3]);
|
---|
[128] | 23 | printf("\n");
|
---|
| 24 | printf("Listen 80\n");
|
---|
| 25 | printf("#ListenSSL 443\n");
|
---|
| 26 | printf("\n");
|
---|
| 27 | printf("#SSLKey key.pem\n");
|
---|
| 28 | printf("#SSLCertificate cert.pem\n");
|
---|
| 29 | printf("\n");
|
---|
| 30 | printf("MIMEType all application/octet-stream\n");
|
---|
| 31 | printf("MIMEType .html text/html\n");
|
---|
| 32 | printf("MIMEType .txt text/plain\n");
|
---|
| 33 | printf("MIMEType .png image/png\n");
|
---|
| 34 | printf("\n");
|
---|
| 35 | printf("Icon all /icons/unknown.png\n");
|
---|
| 36 | printf("Icon text/* /icons/text.png\n");
|
---|
| 37 | printf("Icon image/* /icons/image.png\n");
|
---|
| 38 | printf("Icon misc/dir /icons/folder.png\n");
|
---|
| 39 | printf("Icon misc/parent /icons/parent.png\n");
|
---|
| 40 | printf("DirectoryIndex index.html\n");
|
---|
| 41 | printf("\n");
|
---|
| 42 | printf("Readme README\n");
|
---|
| 43 | printf("\n");
|
---|
| 44 | printf("DocumentRoot %s/www\n", argv[1]);
|
---|
| 45 | printf("BeginDirectory %s/www\n", argv[1]);
|
---|
[161] | 46 | printf(" Allow all\n");
|
---|
[128] | 47 | printf("EndDirectory\n", argv[1]);
|
---|
| 48 | }
|
---|