1 2 3 4 5 6 7 8 9 10 11 12 13 14
#!/bin/bash # Create necessary socket directory mkdir -p /run/fcgiwrap # Start fcgiwrap fcgiwrap -s unix:/run/fcgiwrap/fcgiwrap-nginx.sock & # Change ownership of socket sleep 2 chown nginx:nginx /run/fcgiwrap/fcgiwrap-nginx.sock # Start nginx in foreground nginx -g 'daemon off;'