How to configure Apache
In /etc/apache2/mods-enabled/alias
Alias /vod/ "/home/tangkai/www/vod/"
<Directory "/home/tangkai/www/vod/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
#Deny from all
#Allow from 127.0.0.1
</Directory>
In /etc/apache2/sites-enabled/000-default
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
AddHandler cgi-script .cgi .pl
Order allow,deny
Allow from all
</Directory>
ScriptAlias /www/cgi-bin/ /home/tangkai/www/cgi-bin/
<Directory "/home/tangkai/www/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
In C:\wamp\bin\apache\Apache2.2.21\conf\extra\httpd-vhosts.conf
<VirtualHost *:80>
ServerName s.logicmd.net
ServerAdmin [email protected]
DocumentRoot "c:/Apache2/docs/dummy-host.example.com"
ErrorLog "logs/s.logicmd.net.log"
CustomLog "logs/s.logicmd.net.log" common
ProxyPass / http://172.31.200.49/
ProxyPassReverse / http://172.31.200.49/
<proxy http://172.31.200.49/>
AllowOverride None
Order Deny,Allow
Allow from all
</proxy>
</VirtualHost>
sudo visudo
#User_Alias APACHE = www-data
#Cmnd_Alias FIREWALL = /sbin/iptables, /sbin/ifconfig, /sbin/route
#APACHE ALL = (ALL) NOPASSWD: FIREWALL
www-data ALL = (ALL) NOPASSWD: /sbin/tc
#www-data ALL = NOPASSWD: ALL
tail -f /var/log/apache/error.log
[1]http://ubuntuforums.org/showthread.php?t=639803 [2]http://stackoverflow.com/questions/3166123/how-to-call-shell-script-from-php-that-requires-sudo [3]http://stackoverflow.com/questions/4272246/how-do-i-get-access-control-allow-origin-to-work [4]http://enable-cors.org/