So you need to resize an 8GB boot Disk in AWS after the EC2 is created. In this article we resize the EBS volume without rebooting.
When sending from Roundcube on an Ubuntu server with plesk, we get the following error:
SMTP Error (535): Authentication failed
Connect to a Plesk server via SSH.
Create a copy “postfix” configuration file:
# cp -a /etc/postfix/main.cf /root/backup_main.cf
Open “postfix” configuration file in a text editor, for example, “vi” editor:
# vi /etc/postfix/main.cf
Add the lines specified below to the configuration file main.cf and make sure that these lines are present only once in the file:
Note: replace example.com with required mail server name.
myhostname = example.com smtpd_banner = $myhostname ESMTP $mail_name
Using command line tool. check “postfix” configuration syntax and restart postfix:
postfix check (empty output - means syntax is OK)
# service postfix restart
To find out where disk space is being used:
Get to the root of your machine by running
# cd /
# sudo du -h --max-depth=1
Note which directories are using a lot of disk space.
cd into one of the big directories.
# ls -l
to see which files are using a lot of space. Delete any you don’t need.
Repeat steps to run once you cd into the directory with the largest size
sudo du -h --max-depth=1
FTP is not working and has the following error:
421 Service not available, remote server has closed connection
Also, in the message logs:
Plesk Unable to FTP – missing scoreboard file (Linux)
On CentOS 6 and 7 if you experience issues logging on to FTP server please check the logs for the following:
# tail -f /var/log/messages
Look for this error:
proftpd: fatal: ScoreboardFile: : unable to use '/var/run/proftpd/scoreboard': No such file or directory on line 74 of '/etc/proftpd.conf'
Check in /var/run for a proftpd folder, if it’s missing you have a bug in your ProFTPd version usually caused by using the Atomic repo to update ProFTPd.
Check for atomic:
# ls -la /etc/yum.repos.d/ | grep atomic -rw-r--r--. 1 root root 827 May 18 2016 atomic.repo
The solution is to remove the package and reinstall from Plesk repo:
rpm -e --nodeps psa-proftpd plesk installer --select-release-current --install-component=proftpd service xinetd restart
Then you should be able to connect again. Please note that any changes to proftpd.conf such as enabling custom PassivePorts will be lost and need to be recreated.
This article describes how to change the SSL cert for you Windows server to match a hostname so that when you remote desktop to a windows server, you don’t get a warning for the identity and the SSL cert.
Go to Sectigo (Comodo) and sign up for a free ssl.
First, generate a CSR.
Set up the CSR
Godaddy – https://hk.godaddy.com/en/help/windows-generate-csr-for-code-or-driver-signing-certificate-7282
CSR Generation: Using certreq (Windows)
This article is for administrators who prefer the command shell!
Save the following file as request.inf on your server editing the subject according to the comment:
;----------------- request.inf ----------------- [Version] Signature="$Windows NT$" [NewRequest] Subject = "C=US, CN=something.example.com" KeySpec = 1 KeyLength = 2048 Exportable = TRUE MachineKeySet = TRUE SMIME = False PrivateKeyArchive = FALSE UserProtected = FALSE UseExistingKeySet = FALSE ProviderName = "Microsoft RSA SChannel Cryptographic Provider" ProviderType = 12 RequestType = PKCS10 KeyUsage = 0xa0 HashAlgorithm = SHA256 [EnhancedKeyUsageExtension] OID=126.96.36.199.188.8.131.52.1 ; this is for Server Authentication / Token Signing ;-----------------------------------------------
certreq -new request.inf request.csr
This add the key as well – https://blogs.technet.microsoft.com/rmilne/2014/06/17/how-to-request-certificate-without-using-iis-or-exchange/
Webmail webmail.example.com shows the blank page or the default plesk page.
DNS records for webmail.example.com is managed by external DNS server:
# dig +short webmail.example.com @184.108.40.206 203.0.113.2
There is another IP 203.0.113.3 is set in web server configuration file for webmail.example.com:
grep VirtualHost /etc/httpd/conf/plesk.conf.d/webmails/example.com_webmail.conf | grep -v "/VirtualHost"
grep VirtualHost /etc/apache2/plesk.conf.d/webmails/example.com_webmail.conf | grep -v "/VirtualHost"
Both IP addresses belongs to the server
IP address that is set for domain does not match the one specified on registrar’s side.
Log into Plesk
Browse to Home > Domains > example.com > Web Hosting Access and change IP address to the correct one 203.0.113.2
If the domain has no hosting and used only to serve mail, Web Hosting Access link is not present in Plesk. However, to update IP for webmail’s configuration file is possible via command line:
Connect to the server using SSH
Update the IP address to correct one:
# plesk bin subscription -u example.com -ip 203.0.113.2
DDos Detection Articles:
How to import a very large SQL dump file (6 Gb) to a MySQL database using windows command line. If you are using linux it is the same. The process is the following:
Open a command prompt (or shell in Linux) with administrative privilleges
Connect to a mysql instance using command line:
# mysql -h 192.168.1.1 --port=3306 -u root -p
if you are in localhost you do not need host and port
# mysql -u root -p
Or if plesk,
# mysql -uadmin -p`cat /etc/psa/.psa.shadow`
You are now in mysql shell. Set network buffer length to a large byte number. The default value may throw errors for such large data files
mysql> set global net_buffer_length=1000000;
Set maximum allowed packet size to a large byte number.The default value may throw errors for such large data files.
mysql> set global max_allowed_packet=1000000000;
Disable foreign key checking to avoid delays,errors and unwanted behaviour
mysql> SET foreign_key_checks = 0; mysql> SET UNIQUE_CHECKS = 0; mysql> SET AUTOCOMMIT = 0;
Import your sql dump file
mysql> use db_name; mysql> source backup-file.sql;
Remember to enable foreign key checks when procedure is complete!
mysql> SET foreign_key_checks = 1; mysql> SET UNIQUE_CHECKS = 1; mysql> SET AUTOCOMMIT = 1;
If you are in Linux you can create a Bash script which will do the dirty job and write to stdout start and end time of import:
#!/bin/sh # store start date to a variable imeron=`date` echo "Import started: OK" dumpfile="/home/bob/bobiras.sql" ddl="set names utf8; " ddl="$ddl set global net_buffer_length=1000000;" ddl="$ddl set global max_allowed_packet=1000000000; " ddl="$ddl SET foreign_key_checks = 0; " ddl="$ddl SET UNIQUE_CHECKS = 0; " ddl="$ddl SET AUTOCOMMIT = 0; " # if your dump file does not create a database, select one ddl="$ddl USE jetdb; " ddl="$ddl source $dumpfile; " ddl="$ddl SET foreign_key_checks = 1; " ddl="$ddl SET UNIQUE_CHECKS = 1; " ddl="$ddl SET AUTOCOMMIT = 1; " ddl="$ddl COMMIT ; " echo "Import started: OK" time mysql -h 127.0.0.1 -u root -proot -e "$ddl" # store end date to a variable imeron2=`date` echo "Start import:$imeron" echo "End import:$imeron2"
http://www.ozerov.de/bigdump/ seems good
How to enable and test CORS on Plesk