Pages

Monday, January 12, 2015

Enable SMTP Authentication on cpanel

POP before SMTP authentication allows you to send messages via a POP mail server for 30 minutes before you will need to re-authenticate a session through SMTP.

POP before SMTP authentication is disabled in WHM by default. To enable this option, navigate to WHM’s Service Manager (Home >> Service Configuration >> Service Manager) and select the Antirelayd checkbox.

While POP before SMTP authentication is secure but if the customer will be able to check the email from an office, the current public IP belongs to that office IP has been added to email white list and any one from that network can be send email using this smtp server without any authentication for 30 minutes.

To disable the feature “Authenticate POP before SMTP” in WHM/Cpanel server by simply executing the following command.

To Enabling SMTP authentication

 /usr/local/cpanel/bin/tailwatchd --disable=Cpanel::TailWatch::Antirelayd

How to install Lighttpd for FLV streaming

Lighttpd is a free web server designed for speed, with all the essential functions of a web server.  The low memory footprint (compared to other web servers) small CPU load and speed optimizations  make lighttpd suitable for servers that are suffering load problems, or for serving static media separately from dynamic content. You can install lighttpd as reverse proxy with apache webserver.








We can now setup lighttpd as reverse-proxy for apache.

How to install Lighttpd for FLV streaming

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 running on port 80, these entries will redirect .flv extension to port 81. Add the following code in your apache configuration.
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 !!!

Now restart apache webserver and check your lighttpd access logs /var/log/lighttpd/access.log.

Sunday, January 11, 2015

How to reboot cpanel/whm in ssh

to restart the machine via ssh you type 

/etc/init.d/cpanel restart

That’s it…!!

See more at: http://datlinux.blogspot.com.es/
 Enjoy!!!