Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Netino

Pages: 1 ... 13 14 [15] 16 17 ... 26
211
Backup / Re: Connection Failed
« on: March 16, 2019, 10:08:47 PM »
One last thing, I would like to know that this backup contains all the user files and content from the main server?

No, just for virtual hosts.
If you need backup for the main server, you will need to hardcode it.

212
How to / Re: How to Automate User Account creation?
« on: March 16, 2019, 09:53:53 PM »
The fields to "add" function to add accounts using API are the following:
=================================================
key:   Key authorized by Api administrator
action:   add
domain:   main domain associated with the account
user:   username to create
pass:   Password for the account
email:   Email Address of the account owner
package:   Create account with package
inode:   number of inodes allowed
limit_nofile:   limit_nofile
server_ips:   server_ips
=================================================

Ps:
1) Is not possible to preserve Ids from other server with API. Only hardcoded is possible, although not recommended.
2) you don't have passwords in your data file, but passwords are mandatory to the API.
     So, you can add a field to fulfil the password field, or change it to your taste.
3) max lenght of username field is assumed 8 characters lenth, of valid characters to unix usernames.

So, suppose you have your data accounts in a file name 'dataaccounts.csv' in current directory.

Save and run the following script:
Code: [Select]
#!/bin/sh

# Change the following variables
value_key="[YOUR KEY HERE]"
default_password="[DEFAULT PASSWORD]"
password="[PASSWORD]"
your_server="[YOUR-SERVER]" # IP address or domain

while IFS="," read id username domain ip_address email setup_date package backup; do
status=$(curl --data "key=${value_key}" \
--data "action=add" \
--data "domain=${domain}" \
--data "user=${username}" \
--data "pass=${default_password}" \
--data "email=${email}" \
--data "package=${package}" \
--data "inode=0" \
--data "limit_nofile=0" \
--data "server_ips=${ip_address}" \
https://${your_server}:2304/v1/account)

if [[ ${status} -eq 28 ]]; then
echo "... ... Timeout accessing URL: https://${your_server}:2304/v1/account ... !!!"
echo "Timeout accessing URL https://${your_server}:2304/v1/account: More than $timeout seconds trying to access." | \
elif [[ ${status} -eq 6 ]]; then
echo "... ... Error accessing URL: https://${your_server}:2304/v1/account ... !!!"
echo "Error accessing URL https://${your_server}:2304/v1/account: The domain host could not be resolved." | \
elif [[ ${status} -eq 51 ]]; then
echo "... ... Error accessing URL: https://${your_server}:2304/v1/account ... !!!"
error = "Error accessing URL https://${your_server}:2304/v1/account: Could not communicate securely with server:"
error = "${error} The requested domain does not match the server's certificate."
echo ${error}
elif [[ ${status} -gt 0 ]]; then
error = "Error code ${status} has been returned"
echo "${error}"
fi
done < dataaccounts.csv

This script was written in bash, but you can write it too in php, as suggested in CWP API manager.

213
MySQL / Re: It's possible to upgrade mariadb to 10.3+?
« on: March 15, 2019, 04:48:41 AM »
The upgrade of mariadb is the most sensible service to upgrade, because you need to deal with installed databases.

The PHP switcher in CWP can install and upgrade new PHP versions to you.
Use it periodically.

The Apache server is customized too, and must be upgraded too in a guided way, when new CWP versions asks.

To the remaining default services, you can use just the following command daily:
Code: [Select]
# yum update


214
Information / Re: CWP email send on login
« on: March 15, 2019, 04:38:06 AM »
Login in what services..??

215
How to / Re: How to Automate User Account creation?
« on: March 15, 2019, 04:35:28 AM »
What fields and what format you have in your .csv file..??

216
Installation / Re: Adding CAA record on CWP
« on: March 15, 2019, 04:33:29 AM »
Edit your zone file in '/var/named' directory.
For example, for a "example.com" domain, the file '/var;named/domain.com.db'.

And add the following at the final of that file, for exemple to the Let’s Encrypt certificate authority,:
Code: [Select]
example.com.  CAA 0 issue "letsencrypt.org"

If you want to allow Let’s Encrypt for wildcard certificates, then you can use issuewild:
Code: [Select]
example.com.  CAA 0 issuewild "letsencrypt.org"

Save the changes, and restart named:
(for CentOS 7)
Code: [Select]
# systemctl restart named

(for CentOS 6.*)
Code: [Select]
# service named restart

217
CentOS 6 Problems / Re: Domain Pointing to wrong folder
« on: March 13, 2019, 04:25:35 AM »
You can have a DNS resolving problem, or a apache configuration problem.
But as you are using clodflare, may be you have a apache configuration problem.
Start testing if your domain is resolving correctly to your server.

Run inside your server:
Code: [Select]
# host domain.com

If pointed to your server, check apache logs.
If no, fix you DNS problem.

When you assure your domain is resolving to your server, you can check if apache is serving your pages.
You must check your logs:
Code: [Select]
/usr/local/apache/logs/error_log
/usr/local/apache/logs/access_log
/usr/local/apache/domlogs/domain.com.error.log
/usr/local/apache/domlogs/domain.com.log

If they are served, you can fix the problems as pointed in your logs.

Regards,
Netino

218
Installation / Re: Adding CAA record on CWP
« on: March 13, 2019, 04:13:11 AM »
Good point.
CWP seems not have CAA record in DNS functions.
CAA records are growing in importance in global internet, as several authorities begin to emerge offering free certificates, posing security problems to domain owners.

May be you have do it only manually, at the moment.

Regards,
Netino

219
CentOS 6 Problems / Re: CWP Mail Error
« on: March 13, 2019, 03:15:54 AM »
You can have a broken queue, that could not be managed by CWP in all possibilities, and could need to manually fix the problem.

Follow this tutorial to manage and fix manually you queue, up to fix all of your queue problems:
https://www.wirehive.com/thoughts/5-top-tips-reviewing-postfix-mail-queue/

Naturally, after fix manually, CWP could manage from that on.

Regards,
Netino

220
Installation / Re: Setup NS to have CWP handle all DNS
« on: March 13, 2019, 03:04:23 AM »
Seems you will need to repair manually your zone file.
Post it here, if you need help.
They are in '/var/named' directory.

Regards,
Netino

221
MySQL / Re: It's possible to upgrade mariadb to 10.3+?
« on: March 13, 2019, 03:01:21 AM »
You will have to deal with this upgrade manually, in one way or another, sooner or later.
So, I wouldn't wait.

Try to follow this tutorial:
https://www.ryadel.com/en/mariadb-10-upgrade-10-3-without-losing-data-how-to/

CAUTION: Follow the instructions to do backups very carefully, by dump all of your databases. Believe-me, you could to need that.

222
How to / Re: How to Automate User Account creation?
« on: March 13, 2019, 02:43:27 AM »
You must use the "account" API, from API Manager, in:
"CWP Settings" >> "API Manager" >> "Account".

You find there an example to use a API in your customized programs.
There are functions add, udp, del, list, susp, unsp to accounts, using method post.

223
Installation / Re: Splitting Email with CWP
« on: March 13, 2019, 02:29:11 AM »
Seems you don't have different domains, and your needs are only just for E-mails of the same domain, isn't..?
If so, why you don't create aliases for each E-mail..?
So you can create an alias just for Office365 server.

224
PHP / Re: 502 Bad Gateway
« on: March 11, 2019, 12:24:01 AM »

225
How to / Re: How to enable php-imap?
« on: March 11, 2019, 12:20:06 AM »
Ideally, would sufficient to configure it at php swticher to your php version.
But seems we still have problems configuring users in php-fpm.

Check this thread:
https://forum.centos-webpanel.com/updates/php-fpm-enable/

It still is open.

Pages: 1 ... 13 14 [15] 16 17 ... 26