Troubleshoot - by Hostrare
Lighttpd is an easy web server designed for activity, with all the necessary functions of a web server. The below memory footstep (compared to other web servers) little CPU load and speed optimizations make lighttpd fit for servers that are allowing load difficulties, or for working inactive media definitely from dynamic content. You can install lighttpd as an opposite proxy with an apache web server.
We can now set up lighttpd as reverse-proxy for apache.
find lighttpd rpm repository
http://pkgs.repoforge.org/lighttpd/
or
yum install lighttpd
vi /etc/lighttpd/lighttpd.conf
change lighttpd port to 81 server.port = 81 server.use-ipv6 = "disable"server.username = "nobody" server.groupname = "nobody"
touch /var/log/lighttpd/error.log
touch /var/log/lighttpd/access.log
chown -R nobody.nobody /var/log/lighttpd
/etc/init.d/lighttpd restart
When you get restart error like this errors then check with log file permissions.
Starting lighttpd: (log.c.118) opening errorlog ‘/var/log/lighttpd/error.log’ failed: Permission denied
vi /etc/lighttpd/modules.conf
make sure modules and including these for flv steaming…
include “conf.d/simple_vhost.conf”
include “conf.d/flv_streaming.conf”
include ” conf.d/secdownload.conf”
vi conf.d/simple_vhost.conf
example entry
$HTTP[“host”] =~ “(^|\.)www.lighttpdexample\.com:81$” {
server.document-root = “/home/cpanel/public_html/”
secdownload.secret = “vAfddsv4$%4”
secdownload.document-root = “/home/cpanel/public_html/media/videos”
secdownload.uri-prefix = “/flv/”
secdownload.timeout = 36000
flv-streaming.extensions = ( “.flv” )
h264-streaming.extensions = ( “.mp4” )
}
or
$HTTP[“host”] != “^(fotoblow.tamilcomedy\.info)$” {
simple-vhost.server-root = “/home/username/public_html/”
simple-vhost.default-host = “fotoblow.tamilcomedy.info”
simple-vhost.document-root = “fotoblow”
}
$HTTP[“host”] =~ “(^|\.)fotoblow.tamilcomedy\.info:81$” {
server.document-root = “/home/username/public_html/fotoblow/”
}
$HTTP[“host”] =~ “(^|\.)www.cpanelkb\.net:81$” {
server.document-root = “/home/username/public_html/fotoblow/”
}
$HTTP[“host”] =~ “(^|\.)tamilcomedy\.info:81$” {
server.document-root = “/home/username/public_html/fotoblow/”
}
Then enable steaming modules.
vi conf.d/flv_streaming.conf
server.modules += ( “mod_flv_streaming”)
flv-streaming.extensions = ( “.flv” )
Normally apache will be working on port 80, these entries will redirect the .flv extension to port 81. Add the following code to your apache form.
vi /etc/httpd/conf/httpd.conf
Add the following entries blow domain config
ProxyPassReverse / http://%{HTTP_HOST}:81/
RewriteEngine on
RewriteCond %{REQUEST_URI} .*\.(gif|png|jpg|flv|mp4|mp3)$
RewriteRule ^/(.*) http://%{HTTP_HOST}:81/$1 [P]
That’s all !!!
our suuport team here for you 24/7
+8801977507015support@hostrare.comsend a leter Whether you are looking for a personal website hosting plan or a business website hosting plan, We are the perfect solution for you. Our powerful website hosting services will not only help you achieve your overall website goals, but will also provide you with the confidence you need in knowing that you are partnered with a reliable and secure website hosting platform.