I want to be able to start an apache server from the command line, typing something like apache site-folder or apache . --port=2000
This sh
Hope you find your solution. I hate .htaccess. So I wrote this:
#!/bin/bash
cat >._apache2_dir_conf << EOF
Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf
ErrorLog $1/._apache2_dir_error.log
HostnameLookups Off
NameVirtualHost *:$2
ServerName joyeruc
Listen $2
PidFile $1/._apache2_pid
ServerAdmin joyer@uc
DocumentRoot $1
Options FollowSymLinks
AllowOverride None
Options Indexes FollowSymLinks MultiViews
AllowOverride None
ErrorLog $1/._apache2_dir_error.log
LogLevel warn
EOF
#apache2 -k $3 -X -f $1/._apache2_dir_conf
apache2 -X -f $1/._apache2_dir_conf