Category Archives: linux
Hi,
when you have several virtualhosts with SSL enabled and also, the certificate has been generated with a pass phrase, you need to use SSLPassPhraseDialog to print to apache the password each time it starts, the problem comes as this directive can only be declared 1 time in the general configuration, so to use several password for each SSL generated, you can use this code:
#!/bin/sh
PASS1=”password1″
PASS2=”password2″case $1 in
www.url1.com:443) echo $PASS1;;
www.url2.com:443) echo $PASS2;;
esacexit 0
just replace the passwords and url with the one configured on your webserver, set them execution permission and add this to your apache conf:
SSLPassPhraseDialog exec:/path/to/bash/file
Regards,
Shadow.
Related Post
Hi,
i made other post’s about big blue button in the past, explaining you that was a great peace of open source software focused on delivering a e-learning platform. some days ago i was needed to install it on my job server as it will be integrated to a app we are working on.
so i followed the instructions here and i found some problem in the process that i will detail here, so you can save some time in the task:
bbb-conf don’t start the process:
i need to say that most of the process of installation have gone smoothly but the most biggest problem was that the script that should start everything never finished and get stuck at the start of the asterisk. the solution is to kill all the process that could maybe be working (tomcat,red5,openffice-headless,nginx,asterisk,activemq) and then start them manually in this order:
asterisk activemq bbb-openoffice-headless red5 tomcat6 nginx
bbb-openoffice-headless say that can’t open display X or don’t start
if this is happening to you, try with the commands described here. if that didn’t work, you need to install the package openoffice-headless, and then run:
bbb-openoffice-headless stop bbb-openoffice-headless start
BigBlueButton with apache and not nginx
if you have the same requirement like me, to run big blue button over apache and not nginx, you can follow this guide that is proved that works
if you find other problems, just follow the logic and check the logs of each one of the app’s involved on this (usually are on /var/log) when you found a specific problem there and don’t know how to solve it, you can post on the bbb-setup group for help. also, you can download the VM image their provide ready to use to compare that and your installation and find where is the problem.
i hope you find this useful
Regards,
Shadow.
Related Post
Hi,
on the web app i have been working this past months, we allow the users to upload avatar photos, and some other pictures that are shown at the site. so, i implemented the code i always use to resize the images. it have done the job well on the testing phase but we found that we have bad quality images when the users uploaded their photos. so i looked for a solution and i found phpThumb. this class/script generate resized images in a quickly and easy way. it comes in 2 flavors, in a ready to use script where you pass the parameters of where is the source image, destination, measures etc.. and will print you the image (can be used in img tags as source). and also you have the class where you can manually convert the files and save it on a file or print it etc..
the class use as input the location of the source image, the binary data or a GD resource. also, phpThumb will try to use imagemagick if is installed on the server (that will give you a better quality image) and if is not available, will use GD automatically. i have tried it and i need to say that the best configuration i made to get the best quality image possibly was:
$phpThumb->setParameter('output_interlace',true);
$phpThumb->setParameter('config_output_format', 'png');
$phpThumb->setParameter('fltr', 'q|95');
$phpThumb->setParameter('config_imagemagick_path', '/usr/bin/convert');
i have tried to use jpeg format, but sometimes i get some ugly and pixelated grey background at the thin lines of the image (like words etc..) so the best option was to use png.
you can download phpThumb from here
Regards,
Shadow.
Related Post
Hi,
recently i was needed to set up a ftp account in a test server, so i made it basically adding a user as always. the problem have come when this user, needed to access to a folder located in a higher level than her user directory (basically on /, the root of the system) so, there was only 2 options, or give him root account and access using scp or having that folder under the home directory in some way. so of course i choose the second option. my first thing to try was to create a symbolic link from the folder that was needed to access to a one in the user home directory. after several tries, and in different ways, when i tried to access to the folder, alway told me that the file was not found. so searching a little in the proftp documentation i discover that is impossible to access for a user to access to a folder that is in a upper level than her user directory, but that in linux system, you still could “mount” the folder into another. so i made it like this:
mount –bind /folder/upper/level /home/user/directory/for/folder
this will mount the folder on a another in the user home directory and could be accessed from the ftp account. if you want this mount to be permanent, you need to add it to your fstab in this way:
/folder/upper/level /home/user/directory/for/folder none rw,bind 0 0
and that’s all folks, i hope this help you in some way
Regards,
Shadow.
Related Post
Hi,
recently, in the work, we brought a VPS at linode.com basically to use it for test server (we have some shared accounts also for this purpose, but some of our scripts use a full pat on the root of the HD, so a shared account is not possible) and i wanted to share some first impressions about their service.
we brought plan linode 512 that consist in a vps with 512 mb of ram, 16gb of hard disk, 200gb of transfer per month, with 1 dedicated ip.
Features and Control Panel
of course, as a VPS, you have a ssh access to the server, where you can perform any operation with your designated resources, but also linode give you a control panel with several extra features that i need to say, i found very useful and practical.
Basically when you buy a linode, you are buying resources and those resources you can use them as you wish, with the tools that the control panel provide. the first time you log in, the control panel guide you to the process of installing a linux distribution and installing a HD schema. they provide pre-made linux images called StackScript, that with a few clicks you can have several standard configurations, as a LAMP server, a rails server etc.. i tried the LAMP server and it worked flawless really. at today, the support the most famous distributions, including debian, ubuntu and centos.
the web admin, also provide the feature to have several configuration profiles, that let your boot the vps with different kernel version, HD schema, amount of memory available and network configuration. the usability of the web admin is really good, you have direct access to the most important items as DNS configuration, profiles etc.. and graphs of the network, I/O and CPU uses by hours, and the total used of bandwidth in the current month.
Reverse DNS
this is some of the most valuable features i think also, the correct configuration of a DNS is really a painful job (i say it by experience) and linode make it easy in this case. basically they provide you of the complete DNS service, where you can add and edit zones for your VPS and even create slaves zones, that will be following your master DNS settings in your own DNS server. the setup is simple to use, with instructions in each step and field to fill, that fits for experts and newbies.
Conclusion
i tried other vps service, including the godaddy and vpslink.com, i didn’t see in they web panel’s a useful one really, most of the task needed to be done in ssh and they do not offer those dns features that linode have. i think is a good vps service for small/medium projects, that let you have a server working in a few hours (remember that still is needed to install a mail server and ftp server is most web servers, and that takes time). unfortunately i’m unable to make a performance test, as this is a test server and almost do not have traffic.
i hope this help you in some way
Regards,
Shadow.
Related Post
Hi,
today a quick post, basically only to share this link that has been a great help to solve the bottleneck problem that could happen on postfix.
the bottleneck happen when the queue are stuck’s with too many request for some particular reason (like dictionary attacks or spam’s that make the active queue too busy) or something failed at processing the emails that put the request on incorrect queue.
as example, yesterday, for some reason clamav failed for lack of memory, something weird as the box have enough for everything (something that i need to look about) so, as result, the postfix failed at connect amavis, so the mail system but all the emails into deferred queue. after the restore of clamav, amavis and postifx, y run a postfix reload, that will run the cleanup daemon, to process all the emails that was on deferred and put them on the active queue.
you can diagnose this with the qshape tool, all explained on the link above, is a but difficult to understand at the beginning, but is really useful
i hope it help you in some way
Regards.
Related Post
Hi,
recently i entered into distrowatch.com and i found this distribution, mainly focused in forensic computer and i need to say that is a zone in IT that always interested me, so i give it a shot to see what this distribution have to offer.
click on continue reading to see the full review
Related Post
Hi,
some days ago also passed another strange stuff in the server, when you tried to access to a password protected directory if you entered the correct password + any other string it let you enter. i was a little clueless about this so i asked on serverFault:
http://serverfault.com/questions/180256/mod-auth-wrong-password-authentication
so as the first answer say’s when you generate a user with the htpasswd command, add the -m or -s (i prefer the -s as is SHA encryption) flag to avoid this problem.
is nice to learn something new every day
Regards,
Shadow.
Related Post
Hi,
this happened to me 2 days ago, so i just wanted to share the experience
What is this and why it happens?
you are working on your server, and for some reason, when you try to access to your website, the php start to answer in a weird manner, as the sessions are not saved, or do not answer to the post request. then, as a normal server admin, you try to restart the httpd process, and then it fails and tells you that the system is on read-only mode.
i need to say that when this happen, is something really bad, why mean that that there is a corruption of data on the HD and for that the system to prevent more data corruption, lock itself on read-only mode. this usually happen why the HD are corrupted and need to be changed or some wrong operation have corrupted the data on them.
Ok, we are screw up, so now, what we can do?
if you have a active ssh connection, you are lucky, now is the time to backup any (or all) essential files. i suppose that you have a backup of the files, DB and configuration files, but if not, now is the time to do it. i’ll recommend to use a web storage as amazon S3, cheap and reliable in this cases
. after the backup, is time to face the reality, so umount all the HD and run a fsck. when finish, then reboot. is 90% possible that the server didn’t come back, and you going to need to install and configure everything again.
How i can prevent this?
as far i know you can’t prevent this really, but you can minimize the downtime to minimum implementing a RAID 1 in your servers. in this way, both disks going to have a exact copy, so when one fails, automatically the second one will me mounted. as optional, there are services available to get a email/sms alerts in this cases (i think also nagios support this type of monitoring). anyway, even that you have a RAID 1, make periodical backups outside your servers, is always a second guaranteed for the data lost and corruption (again, amazon S3 seems to be the best option).
i hope this could help you in some way
Regards,
Shadow.
Related Post
Hi,
i don’t like to write things that you can find on the web, but i think something like this is very useful for those server admins
you can find the complete process of how to do it here and here remember that in centOS system you need to install this dependencies:
yum install curl*
yum install libxml2*yum install fuse-devel
and to get your access key, you can go here
i hope it help you in some way
Regards,
Shadow.






