Archive for August, 2009|Monthly archive page

Wildcard DNS – subdomain profile

A wildcard DNS record is a record in a DNS zone that will match requests for non-existent domain names. A wildcard DNS record is specified by  “*” as the left most label of a domain name, e.g. *.example.com.

DNS zone Entry

example.com. 86400 IN SOA example.com. hostmaster.example.com.
IN NS ns1.example.com.
IN NS ns2.example.com.
IN MX 10      mail.example.com.
IN A 192.168.1.1
mail A 192.168.1.1
ns1 A 192.168.1.1
ns2 A 10.0.0.2
*.example.com. A 192.168.1.1

.htaccess file:
<IfModule mod_rewrite.c>

RewriteCond %{HTTP_HOST} !^www\.example\.com
RewriteCond %{HTTP_HOST} ([^.]+)\.example\.com
RewriteRule ^$ profile.php?uid=%1

</IfModule>

Now if you want sandeepverma.example.com it will redirect to profile.php with uid=sandeepverma

Find Apache Document Root

solution: Find Apache Document Root

# grep -i 'DocumentRoot' httpd.conf

# find / -name httpd.conf
or
# locate
httpd.conf

(if file here /etc/httpd/conf/httpd.conf)

# grep -i 'DocumentRoot' /etc/httpd/conf/httpd.conf

solution: ffmpeg, libogg, libvorbis, freetype, gcc, faad2, faac

These are the basic tools/libs for video encoding:

sudo yum -y install \
SDL* glew glew-devel libmad-devel tre tre-devel \
libogg libogg-devel libvorbis libvorbis-devel \
boost boost-devel bzip2-devel bzip2-libs fribidi* \
lzo lzo-devel mysql-libs mysql-devel jasper jasper-devel \
faac faac-devel enca enca-devel hal hal-devel hal-libs \
cmake gperf nasm libXmu-devel fontconfig-devel \
freetype-devel libXinerama-devel pcre-devel gcc-c++ \
sqlite-devel curl-devel libsamplerate-devel libcdio-devel \
pulseaudio-libs-devel avahi-devel ffmpeg-devel libmad-devel \
a52dec-devel libdca faad2-devel libmpeg2-devel libass-devel \
libvorbis-devel libogg-devel libmpcdec-devel flac-devel \
wavpack-devel python-devel subversion