Posts by :
suphp plesk alternative mod_ruid2 wordpress upload permission issue
November 23rd, 2012
So, you finally came here finding an alternative solution for your Plesk server for wordpress and other CMS for uploading files via web server. I will help you solving the issues, the alternatives for suphp are mpm-itk and mod_ruid2, I tried configuring mpm-itk in the plesk server but it was not supported properly, there were few sites which were diplaying blank page, so I prefer mod_ruid2 over mpm-itk for plesk environment.
First download the atomicorp repository if you dont have the latest one using the below commands. This may over write the current atomic repostory
cd /root wget http://www.atomicorp.com/installers/atomic chmod +x ./atomic ./atomic
Then download the apache module mod_ruid2 via yum
yum install mod_ruid2
then edit the config file at /etc/httpd/conf.d/ruid2.conf and add the below similar configuration into it.
<Directory /var/www/vhosts/domain.com> RMode stat RUidGid ftpuser psacln RGroups psaserv </Directory>
save the file and restart apache service.
/etc/init.d/httpd restart
That’s it you are done, make a note that you need to manually add all the domain name where you need to run the website on it’s own username. Not sure if there is any other alternative to automate it.
OpenVZ Command Line Reference Configuration Files
November 1st, 2012
Hello,
The following tutorial will help you with managing OpenVZ main node.
Commands to manage OpenVZ:
======================
1. “vzlist” will list all the containers present in the main node.
2. “vzctl” will have alot of options like below.
vzctl enter will allow you to enter into the respective container.
vzctl restore [–dumpfile ] will allow you to restore the dump file
with the container ID.
vzctl destroy will allow you to delete the respective container.
vzctl start will allow you to start the respective container.
vzctl stop will allow you to stop the respective container.
vzctl restart will allow you to restart the respective container.
vzctl create [–ostemplate ] [–config ] will allow you to
create a container with the specified CTID OS and config file.
OpenVZ file paths:
=============
1. All container datas,templates,dumps will be located in /vz/ by default.
2. Container OS templates are all stored in /vz/template/cache/.
3. Container datas will be stored in /vz/private/
4. Container lock files will be stored in /vz/lock/.lck
Thank you for viewing helpinlinux.com
cpanel exim stop spam
November 1st, 2012
Hello,
The following cPanel/Exim configuration will help you stopping spam in the server.
1. Login to WHM control panel
2. Goto Main >> Service Configuration >> Exim Configuration Manager
3. Enable RBL filtering by Basic Editor >> RBLs >> switch to “On” and if you like you may additional RBL from manage option.
4. Enable Sender Verification by Mail >> Sender Verification >> “On” this will check if the mail origin really exists.
5. Reject SPF failures by ACL Options >> Reject SPF failures >> “On” this will verify SPF records and if the SPF record is set to fails then the E-mails from those IPs will be rejected.
6. Home >> Server Configuration >> Tweak Settings
7. Turn “Initial default/catch-all forwarder destination” to “fail” this will fail the catch all feature to be sent to default cPanel account.
8. “Set Max hourly emails per domain” which will limit the E-mail flooding from the server(I normally set it to 70 which is good enough for a single domain for an hour).
9. Set “Maximum percentage of failed or deferred messages a domain may send per hour” everyone knows that Spam E-mails will have alot of non existing E-mail which will then be deferred so If we set this to say 50% the spamming E-mail account will be suspended temporarily if the deferred mails are above 50%.
10. Then save all the configuration this will stop most of spams in the server.
Thank you for viewing helpinlinux.com
cpanel to cpanel transfer
November 1st, 2012Hello,
You can follow the below steps to migrate websites from a cPanel server to cPanel server via whm root password.
1. Login to the control panel https://destinationhost.com:2087
username: root
password: whmrootpassword
2. Select –> Transfers –> Copy an account from another server
3. Fill the following details.
a. Remote Server Type: WHM/cPanel
b. Remote Server Address: xx.xx.xx.xx
c. Remote SSH port: 22
d. Username to Copy: (accountname)
e. Login (Select Root)
f. Root Password: sourceserverpassword
4. Select Transfer Account and wait untill the page completely loads, and you get the below output.
Restore Complete
Account Restore Complete Unlocking password for user accountname.passwd: Success.
Removing Copied Archive on remote server…. Done
Transfer Complete
Account Copy Process Complete
Solusvm Templates OpenVZ Add
September 25th, 2012
Hi,
You can add templates to your solusvm control panel on your OpenVZ server, you may follow the below steps to add it.
1. You may download the operating system in tar.gz format at http://ftp.openvz.org/template/precreated/contrib/ and then upload them to /vz/template/cache .
2. Then login to your solusvm control panel using admin user at http://xx.xx.xx.xx:5353/admincp
3. Then select Dashboard –> Media –> Add OpenVZ Template
4. Now, you will have options like “Name, Description, etc. fill that and select the downloaded template at “Template” drop down.
5. Select the downloaded template arch and select “ADD TEMPLATE”
That’s it you have completed adding a OS template in SolusVM, you may use this newly added template to reinstall your guest OS.
Thank you for viewing https://helpinlinux.com
apache create multiple virtual hosts script | shell | bash
August 7th, 2012Hello,
The following script will help you to create upto 5 websites in apache with basic configuration you may increase the number to N by adding N numbers for value a. Please make sure that you have taken a backup of /etc/httpd/conf/httpd.conf file before you proceed, and this script will create a user too so make sure you understand what it is doing.
#!/bin/bash #! Shell script to add multiple domains/websites for apache echo "Make sure that you took backup of your /etc/httpd/conf/httpd.conf file before proceeding" for a in 1 2 3 4 5 do echo "Enter the name of the domain you wish to create" read a touch /etc/httpd/conf/httpd.conf echo "Enter the username of the website you wish to create" read username /usr/sbin/useradd $username echo "Enter the password for the user $username" /usr/bin/passwd $username echo "Enter the website path in the server" echo "Example /home/$username/public_html" read i mkdir -p "$i" chmod 750 /home/$username echo "Enter the IP address to which the domain should listen to" read ip echo "<VirtualHost $ip:80>" >> /etc/httpd/conf/httpd.conf echo "ServerAdmin webmaster@$a" >> /etc/httpd/conf/httpd.conf echo "DocumentRoot $i" >> /etc/httpd/conf/httpd.conf echo "ServerName $a" >> /etc/httpd/conf/httpd.conf echo "ErrorLog logs/$a-error_log" >> /etc/httpd/conf/httpd.conf echo "CustomLog logs/$a-access_log common" >> /etc/httpd/conf/httpd.conf echo "</VirtualHost>" >> /etc/httpd/conf/httpd.conf done echo "Please make sure that you have set apache user to read permission at /home/user folder"
Thank you for viewing helpinlinux.com
apache create virtual host shell script
August 6th, 2012
Hello,
The following script will help you to create a website in apache with basic configuration. Please make sure that you have taken a backup of /etc/httpd/conf/httpd.conf file before you proceed, and this script will create a user too so make sure you understand what it is doing.
#!/bin/bash #! Shell script to add domains/websites in apache echo "Make sure that you took backup of your /etc/httpd/conf/httpd.conf file before proceeding" echo "Enter the name of the domain you wish to create" read a echo "Enter the username of the website you wish to create" read username /usr/sbin/useradd $username echo "Enter the password for the user $username" /usr/bin/passwd $username echo "Enter the website path in the server" echo "Example /home/$username/public_html" read i mkdir -p "$i" chmod 750 /home/$username echo "Enter the IP address to which the domain should listen to" read ip echo "<VirtualHost $ip:80>" >> /etc/httpd/conf/httpd.conf echo "ServerAdmin webmaster@$a" >> /etc/httpd/conf/httpd.conf echo "DocumentRoot $i" >> /etc/httpd/conf/httpd.conf echo "ServerName $a" >> /etc/httpd/conf/httpd.conf echo "ErrorLog logs/$a-error_log" >> /etc/httpd/conf/httpd.conf echo "CustomLog logs/$a-access_log common" >> /etc/httpd/conf/httpd.conf echo "</VirtualHost>" >> /etc/httpd/conf/httpd.conf echo "Please make sure that you have set apache user to read permission at /home/$username folder"
Thank you for viewing https://helpinlinux.com
shell script useradd linux | password | bash
August 6th, 2012
Hello,
The following script will create upto five users and you will need to provide username and password on prompt. You may change this to N number of users by increasing the values from 5 to N numbers that you wish.
#!/bin/bash # Shell script to create multiple users for a in 1 2 3 4 5 do echo "Enter the name of the user you wish to create" read a /usr/sbin/useradd $a echo "Enter the password for the user $a" /usr/bin/passwd $a done
Thank you for viewing helpinlinux.com
Command Line FTP Upload Recursive Linux | Directory | Folder
August 6th, 2012
Hello,
The following command will help you to upload all the files/folders from local to remote server, make sure that you have installed ncftp rpm in your server.
ncftpput -R -u ftpuser -p ftppassword ftpserver.com /remote/path/. /local/path
Reference : http://www.cyberciti.biz/tips/linux-upload-the-files-and-directory-tree-to-remote-ftp-server.html
change xen guest os time to independent
July 29th, 2012Hello,
If you want to change the guest OS time independent to main node time you need to add the following line to your /etc/sysctl.conf
xen.independent_wallclock=1
and then execute the following command to make the changes live.
sysctl -p
Thank you for viewing https://helpinlinux.com