$ENV{APACHE_RUN_USER} = 'martyn'; $ENV{APACHE_ERROR_LOG} = "/proc/$$/fd/1"; $ENV{APACHE_PID_FILE} = $FindBin::Bin . '/apache2.pid'; $ENV{APACHE_DOCUMENTROOT} = $FindBin::Bin; $ENV{PERL5LIB} = $FindBin::Bin; $ENV{APACHE_HANDLER} = 'PasteBot'; $ENV{PASTEBOT_STORAGE_DIR} = $FindBin::Bin . '/paste'; system( '/usr/sbin/apache2', '-X', # Single process in foreground '-f' => $FindBin::Bin . '/apache2.conf', );