123456789101112131415161718192021222324252627282930313233343536 |
- #!/bin/bash
- cat <<EOF
- listen 0.0.0.0:16969 512; //backlog=512
- //default thread count is NCPU
- //threads 2;
- //bindings sections embedded in vhost sections are processed
- //before bindings in the global scope
- ipcbuffersize 16777216;
- vhost vh1 {
- bindings {
- {
- listen 0.0.0.0:16969;
- httphost localhost:16969; //only match requests going to hostname "localhost"
- }
- }
- //the second exec is a shell command telling the shell to not fork, but execve() directly
- exec exec '$(pwd)'/socketd_cppsp -m /dir_list.cppsm -r '$(pwd)'/www -c -fPIC -c -I'$(pwd)'/include -c -Ofast -c -march=native -c '$(pwd)'/cpoll.o -c '$(pwd)'/cppsp.o -f;
- shell 1;
- preload 0; //socketd_cppsp is a native socketd application; no need to preload socketd_proxy
- //at runtime, the # of processes will be rounded up to the nearest multiple
- //of the # of socketd threads, so the actual processes started will be NCPU
- processes 1;
- }
- vhost vh2 {
- bindings {
- //adjust your /etc/hosts to test this
- {httphost host1:16969;}
- }
- exec exec lighttpd -D -f /path/to/lighttpd.conf;
- shell 1;
- preload 1; //preload socketd_proxy.so to run an unmodified http server under socketd
- }
- EOF
|