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 - darkness

Pages: 1 ... 11 12 [13] 14
181
CentOS 6 Problems / Re: CentOS6 Upgrade
« on: March 16, 2017, 01:07:37 PM »
Code: [Select]
[root@msi ~]# yum list installed | grep apr
apr.x86_64                           1.3.9-5.el6_2              @base
apr-devel.x86_64                     1.3.9-5.el6_2              @base
apr-util.x86_64                      1.3.9-3.el6_0.1            @base
apr-util-devel.x86_64                1.3.9-3.el6_0.1            @base
apr-util-mysql.x86_64                1.3.9-3.el6_0.1            @base
[root@msi ~]#

182
CentOS 6 Problems / Re: CentOS6 Upgrade
« on: March 16, 2017, 08:27:09 AM »
In 15min I got 76747 lines in /usr/local/apache/error_log which are the same, so I will paste just 2 of them:
Code: [Select]
[Thu Mar 16 09:22:23.749044 2017] [core:error] [pid 23340:tid 140131841574720] AH00546: no record of generation 0 of exiting child 1546
/usr/local/apache/bin/httpd: symbol lookup error: /usr/local/apache/bin/httpd: undefined symbol: apr_skiplist_init
Any idea?

183
CentOS 6 Problems / Re: CentOS6 Upgrade
« on: March 16, 2017, 06:09:10 AM »
After the update none of my websites is working. No error through web browser. I decided to put PHP 7.0.16 and I see:
Code: [Select]
Error Summary
-------------

buildconf: checking installation...
buildconf: autoconf version 2.63 (ok)
rebuilding aclocal.m4
rebuilding configure
configure.ac:276: error: Autoconf version 2.64 or higher is required
build/ax_check_compile_flag.m4:60: AX_CHECK_COMPILE_FLAG is expanded from...
autom4te: /usr/bin/m4 failed with exit status: 63
rebuilding main/php_config.h.in
configure.ac:276: error: Autoconf version 2.64 or higher is required
build/ax_check_compile_flag.m4:60: AX_CHECK_COMPILE_FLAG is expanded from...
autom4te: /usr/bin/m4 failed with exit status: 63
autoheader: '/usr/bin/autom4te' failed with exit status: 63
/usr/local/cwp/.conf/php_conf/php7.conf: line 1: ./configure: No such file or directory
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target `install'.  Stop.
Stopping httpd: [  OK  ]
Starting httpd: [  OK  ]

Build Completed
###################


/usr/local/src/php-build.sh: line 16: /scripts/add_alert: Permission denied

184
I can build it / Re: OpenVZ with CWP
« on: March 14, 2017, 12:10:50 PM »
when using files from linux (like password from a file) you should check that there is no new lines, empty spaces....
When I use that way:
Code: [Select]
$file = "/root/.my.cnf";
$lines = file($file);
list($password, $pass) = explode("=", $lines[1]);
The command echo returns everything that I need:
Code: [Select]
echo $pass; returns the password for MariaDB(MySQL) from the file. But using it with connection function/class gives an error.

185
I can build it / Re: OpenVZ with CWP
« on: March 14, 2017, 12:05:04 PM »
Ok, I didn`t go to sleep. I continued to try to fix my error, but I`m still stuck. I wrote down the things new way using PDO, but now I got a new error:
Code: [Select]
$file = "/root/.my.cnf";
$lines = file($file);
list($password, $pass) = explode("=", $lines[1]);
class Database{
    // specify your own database credentials
    private $host = "127.0.0.1";
    private $db_name = "root_cwp";
    private $username = "root";
    private $password = $pass; -> Line 13 making the error;
    public $conn;

    // get the database connection
    public function getConnection(){

        $this->conn = null;

        try{
            $this->conn = new PDO("mysql:host=" . $this->host . ";dbname=" . $this->db_name, $this->username, $this->password);
        }catch(PDOException $exception){
            echo "Connection error: " . $exception->getMessage();
        }

        return $this->conn;
    }
}
And in one moment:
Code: [Select]
Fatal error: Constant expression contains invalid operations in /usr/local/cwpsrv/htdocs/resources/admin/modules/database.php on line 13
Never got an error like that before, so please somebody help me with it.

186
I can build it / Re: OpenVZ with CWP
« on: March 14, 2017, 07:47:28 AM »
Got some strange problem on the admin panel:
Code: [Select]
$root_file = "/root/.my.cnf"; -> From which file to get mysql password
$lines = file($root_file); -> Open file
list($password, $pass) = explode("=", $lines[1]); -> Get the password after =
$sql = new mysqli('localhost', 'root', $pass, 'root_cwp'); -> Making connection to the database(as the example in php.net)

if (!$sql) { -> Checking if connection was successful
    echo "Error: Unable to connect to MySQL." . PHP_EOL; -> Error message
    echo "<br>Debugging errno: " . mysqli_connect_errno() . PHP_EOL; -> Error number
    echo "<br>Debugging error: " . mysqli_connect_error() . PHP_EOL; -> Error
    exit;
}

$query = "SELECT username FROM user ORDER BY id"; -> Query
$result = mysqli_query($sql, $query); -> Execute query
while ($row = mysqli_fetch_array($result)) { -> Fetching the array
        $user = '<option value=". $row[\'username\'] .">'; -> Setting $user for dropdown menu
    }

And here comes the error:
Code: [Select]
Warning: mysqli::__construct(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES) in /usr/local/cwpsrv/htdocs/resources/admin/modules/openvz_cct.php on line 52I checked error 1045 in MariaDB.com:
Code: [Select]
1045 28000 ER_ACCESS_DENIED_ERROR Access denied for user '%s'@'%s' (using password: %s)Maybe because the last 2 days I slept only 2 hours and I`m making a mistake which I can`t see. If somebody see it please correct me. Will be appreciated.

187
I can build it / OpenVZ with CWP
« on: March 12, 2017, 03:54:42 PM »
Hello people,
As for now that you can use CWP just for shared hosting I decided to create a module for OpenVZ with some functions:
Admin Panel:
1. Install OpenVZ on your system (keep in mind that installing OpenVZ requires reboot for new kernel!!!)
2. Create containers
3. Set IPv4 & IPv6 to the containers
User Panel:
1. Boot container
2. Shutdown container
3. Reboot container
4. Reinstall container
5. SSH Console to the container through CWP
6. Change hostname
7. Change root password
I will also try to make a module where you add more servers and you create/delete containers through just 1 main CWP.
I also have plan to make the same for KVM and Xen, but I`m still waiting for 2x Dell PowerEdge 1950 and 1x Dell PowerEdge 2950(I know they are old rigs, but are good for testing) from UK and for the moment I have a free server which supports only OpenVZ.
All the scripts/modules will be provided for FREE FOREVER from me, but ionCube crypted. Some people will say "I want open source". I don`t agree with that since I saw a post in the forum that somebody want to change the logo of CWP and I don`t like that when somebody is offering something good to you for free you want to change logo/copyright to sign it on your name.I will provide my full source code unencrypted to CWP developers if they want to improve it or add it to a new version(I know that my way of writing PHP code sux, so may be they will rewrite it full, but ... ).
If you have any ideas what else can be added for OpenVZ I will be happy if you share them with me.
Thank you for reading and wait for the first release.

188
I can build it / IPv6 configuration for CentOS 6.8 (Final)
« on: March 09, 2017, 10:20:44 PM »
Ok guys,
Here`s something I`d like to share with you. It`s an IPv6 configuration script for CentOS 6.8 (Final) to make it easy to have IPv6 tunnel on your server. At the moment this is version 0.1 which can only add the IPv6 tunnel configuration to your already running CentOS server. As a first version it`s simple and fast, also has it`s bad sides like: after every reboot you need to run the script again to re-config your IPv6. But this is what I did in 15min with 39 degs temp. In the next version I`m planning to include ping to ipv6.google.com through the script, adding IPv6 addresses through it. In version 0.3 or 0.4 I`ll try to make it able to config your web server, email server, DNS forward and reverse. Just I need time because I`m very busy and atm I`m a bit sick.
Ok, stop fooling you around.
1. Download the script from http://www.born2host.com/born2host.zip and put it in /usr/local/cwpsrv/htdocs/resources/admin/modules
2. Unzip it with "unzip born2host.zip"
3. Open /usr/local/cwpsrv/htdocs/resources/admin/include/3rdparty.php and add:
3.1 <li><a href="index.php?module=born2host_ipv6"><span class="icon16 icomoon-icon-arrow-right-3"></span>IPv6 Configuration</a></li>
4. Create account in http://www.tunnelbroker.net
5. Log in to your account in tunnelbroker.net
6. Go to User Functions -> Create Regular Tunnel
7. Enter the IPv4 address of the server(your CentOS 6.8 server)
8. Choose one of the available tunnel servers (ping the all one by one and choose the one with less time=... ms)
9. Click on your tunnel to open Tunnel Details
10. Login with root to your CWP and head up to Developer Menu -> IPv6 Configuration
11. From Tunnel Details grab "Server IPv4 Address:" which is normally 216.66.87.14 and paste it in the script in the field called "Please provide your tunnel broker IPv4:   "
12. From Tunnel Details grab "Client IPv6 Address: " which normally starts with 2001:470:xxxx:xx::2/64 (don`t forget to copy it with the /64) and paste it in the script in the field called "Please provide your IPv6 tunnel:"
13. Press "Add IPv6" button
14. Login through SSH to your CentOS server and type: ping6 -c 5 ipv6.google.com If everything is ok you will see something similar to this:
Code: [Select]
[root@msi ~]# ping6 -c 5 ipv6.google.com
PING ipv6.google.com(waw02s05-in-x0e.1e100.net) 56 data bytes
64 bytes from waw02s05-in-x0e.1e100.net: icmp_seq=1 ttl=57 time=62.3 ms
64 bytes from waw02s05-in-x0e.1e100.net: icmp_seq=2 ttl=57 time=63.1 ms
64 bytes from waw02s05-in-x0e.1e100.net: icmp_seq=3 ttl=57 time=61.7 ms
64 bytes from waw02s05-in-x0e.1e100.net: icmp_seq=4 ttl=57 time=61.0 ms
64 bytes from waw02s05-in-x0e.1e100.net: icmp_seq=5 ttl=57 time=63.1 ms

--- ipv6.google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4068ms
rtt min/avg/max/mdev = 61.079/62.302/63.156/0.796 ms
[root@msi ~]#
If you see something similar to this you are done and have fun.
If you have any problems activating IPv6 tunnel support feel free to ask(may be you don`t have IPv6 support enabled on your server or something else).
<- check this picture just in case to be sure what to copy and paste from tunnelbroker.net to the script.

Oh yeah. By the way the script is encoded with ionCube Encoder for PHP 5.6.x

189
New Modules / Re: Cool file manager
« on: March 09, 2017, 05:34:23 PM »
To set up modules to start with CentOS:
 <code>chkconfig module_name on</code>
To add it on the CWP menu you need this:
 Open /usr/local/cwpsrv/htdocs/resources/admin/include/3rdparty.php and put inside:
<code><li><a href="index.php?module=module_name"><span class="icon16 icomoon-icon-arrow-right-3"></span>Module Name</a></li></code>

I assume that you have module_name.php in /usr/local/cwpsrv/htdocs/resources/admin/modules
If not - put it there.

190
Updates / Re: Webmail Blank Page
« on: March 09, 2017, 04:56:18 PM »
As I see there is missing PEAR class in the /tmp/roundcubemail-1.2.3/program/lib/Roundcube/bootstrap.php which has nothing to do with CWP as far as I know.
P.S.
With RoundCube personally I`m using also AfterLogic and RainLoop web mails. RoundCube and AfterLogic for users and RainLoop for me(because I like it more the way it looks). Go on their pages and you will find very useful and easy install instructions and scripts. Best wishes.

191
Updates / Re: hey please help me
« on: March 09, 2017, 04:51:09 PM »
If you upgrade to CentOS 7 and you don`t have NIC 10/100/1000 or 100/1000 you will NOT have internet. This is some basic change made by RHEL so it`s going on CentOS and you are stucked. So think twice do you really need to upgrade it. Best wishes.

192
Apache / Re: Apache is running but I can`t access my site on port 80
« on: December 17, 2016, 12:24:37 AM »
Solved. Error in router Port Forwarding 80->82 instead of 80->80.

193
E-Mail / How to install Horde Webmail
« on: December 17, 2016, 12:05:01 AM »
Here`s how I installed my Horde Webmail. I assume that you already have CWP with Apache, PHP and MySQL.
1. Register Horde PEAR channel:
   pear channel-discover pear.horde.org
2. Set Horde installation directory:
  cd /usr/local/apache/htdocs
  pear install horde/horde_role
  pear run-scripts horde/horde_role
3. Install Horde Groupware Webmail Edition:
  pear install -a -B horde/webmail
4. Run installation script:
  webmail-install
5. Test Horde Groupware Webmail Edition:
  cd /usr/local/apache/htdocs/horde/config/
  nano -w conf.php
  find
Code: [Select]
$conf['testdisable'] = true; and change it to
Code: [Select]
$conf['testdisable'] = false;6. Making it visible
  Go to CWP -> Apache Settings -> Apache Include Conf -> domain-redirects.conf
  Add this line at the end of the file:
Code: [Select]
Alias /horde /usr/local/apache/htdocs/horde  Save and restart Apache
7. Check if everything is ok
  Go to http://your_ip/horde/test.php or http://your_domain/horde/test.php
  If you see everything in green than you are ok. Change back to $conf['testdisable'] = true; and enjoy your new horde webmail.
  If you see something in red install/fix it. Check test.php again until you see everything in green.

When you`re ready with all the stuff in test.php DON`T FORGET to edit again /usr/local/apache/htdocs/horde/config/conf.php and set $conf['testdisable'] = true;
Hope this helps. I`ll try to answer all the questions if you have any.
 

194
DNS / DNS/Bind Working Conf & Zones
« on: December 16, 2016, 11:43:59 PM »
I want to share with my working DNS conf & zones and I will try to explain:
First file is /etc/named.conf
Code: [Select]
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a any DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//

options {
        version "Your mom`s version is too old!"; // Good to set something here different from the real version for security
listen-on port 53 { any; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query     { any; };
allow-transfer  { any; };
allow-recursion { any; };
dnssec-enable yes;
dnssec-validation yes;

/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";

managed-keys-directory "/var/named/dynamic";
};

logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};

zone "." IN {
type hint;
file "named.ca";
};

include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
// Reverse zone
zone "172.236.77.in-addr.arpa" in{
type master;
file "/var/named/172.236.77.in-addr.arpa.db";
allow-update { none; };
};
// Reverse zone for localhost
zone "0.0.127.in-addr.arpa" in{
type master;
file "/var/named/0.0.127.in-addr.arpa.db";
};
// Forwarding zone
// zone devilix.org
zone "devilix.org" in{
type master;
file "/var/named/devilix.org.db";
};
// zone_end devilix.org

Second file is /var/named/devilix.org.db
To generate easy your DMARC record go to https://www.unlocktheinbox.com/dmarcwizard/
To generate Google Verification Code in TXT for your DNS go to https://support.google.com/a/answer/183895?hl=en&ref_topic=2716886 and follow the instructions
Code: [Select]
$TTL   14400 // TTL - Time To Live
@        IN      SOA     ns1.abusers.eu. root.devilix.org. ( // ns1.abusers.eu - your main DNS server(this one), root.devilix.org - DNS Server owner/admin
                2016121201      ; serial, todays date+todays // Serial number - YYYYmmddcn - Year(2016)Month(12)Day(12)ChangeNumber(01)
                86400           ; refresh, seconds
                7200            ; retry, seconds
               3600000         ; expire, seconds
               86400 )         ; minimum, seconds
;; NS Records (All this name servers resolve to the same IP address - 77.236.172.141, except ns1.devilix.org)
@ IN NS ns1.abusers.eu. // DNS 1
@ IN NS ns2.abusers.eu. // DNS 2
@ IN NS ns1.devilix.org. // DNS 3
@ IN NS ns2.devilix.org. // DNS 4
@ IN NS dev.abusers.eu. // DNS 5
@ IN NS devil.abusers.eu. // DNS 6
@ IN NS devilix.abusers.eu. // DNS 7
;; A Records // Forwards
@ IN A 77.236.172.141 // Forward devilix.org to 77.236.172.141
ns1 IN A 127.0.0.1 // Forward ns1.devilix.org to 127.0.0.1/localhost
ns2 IN A 77.236.172.141
server IN A 77.236.172.141
mail IN A 77.236.172.141
localhost IN A 127.0.0.1
;; PTR Records // Reverse record (not 100% sure if it`s needed in this file)
77.236.172.141 IN PTR devilix.org.
;; MX Records // Mail eXchange (needed for your Mail Server)
devilix.org. IN MX 10 mail.devilix.org.
;; CNAME Records // Canonical Names(@ is the same like devilix.org but @ is more short)
www IN CNAME @
ftp IN CNAME @
cwp IN CNAME @
;; DMARC Records // Needed for your Mail Server.
_dmarc.devilix.org. IN TXT "v=DMARC1; p=none; sp=none; rua=mailto:postmaster@devilix.org; ruf=mailto:postmaster@devilix.org; rf=afrf; pct=100; ri=86400"
;; DKIM Records // Needed for your Mail Server. Can generate from CWP -> Email -> DKIM Manager(Select SPF also)
default._domainkey IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC7A+Opw3Jll87M9ZoevC+UOBwSkbrOSrgSgk3OabrKF7dMshoMDf0LHcS5Zwj/I4eiMTj7vtkoavHAhgW/0/GmH7fyNgKQm942NpvKcLEHTJ1ndDNk0luvXS+E0Rw6wiCyAKwj/LCbZcidhgz1iVn53VZTQCAiMj1V+q3z5ADPIQIDAQAB"
;; SPF Records
devilix.org. IN TXT "v=spf1 +a +mx +ip4:192.168.1.101 ~all"
;; Google Verification // Needed for your Mail Server.
@ IN TXT google-site-verification=_C1V8AhaVWFwNQn4fO5Id7IXbQTgcC67ItmH9r4SABY
Third file is /var/named/0.0.127.in-addr.arpa.db
Code: [Select]
$TTL 3D
@               IN      SOA     ns1.devilix.org. root.devilix.org. (
                                2016111300  ; Serial
                                8H      ; Refresh
                                2H      ; Retry
                                4W      ; Expire
                                1D)     ; Minimum TTL

@    IN   NS      ns1.devilix.org. // Remember that ns1.devilix.org resolves to 127.0.0.1/localhost
1      IN   PTR    localhost.
0.0.127.in-addr.arpa. 14400 IN TXT "v=spf1 +a +mx +ip4:192.168.1.101 ~all" // not sure if it`s needed
Forth file is 172.236.77.in-addr.arpa.db
Code: [Select]
$ORIGIN 172.236.77.in-addr.arpa. //Don`t forget this
$TTL 2d ; default TTL for zone 172800 secs
@ IN SOA dev.abusers.eu. root.devilix.org. (
                         2016121401         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;; NS Records
IN NS dev.abusers.eu.
IN NS devil.abusers.eu.
IN NS devilix.abusers.eu.
IN NS ns1.abusers.eu.
IN NS ns2.abusers.eu.
IN NS ns1.devilix.org.
IN NS ns2.devilix.org.
;; PTR Records // This is your reverse record(if your ISP allows it)
141 PTR devilix.org.

Now let`s see:
Code: [Select]
[root@srv1 ~]# nslookup devilix.org
Server:         77.236.172.141
Address:        77.236.172.141#53
Name:   devilix.org
Address: 77.236.172.141
[root@srv1 ~]#
Code: [Select]
[root@srv1 ~]# dig devilix.org
;; QUESTION SECTION:
;devilix.org.                   IN      A
;; ANSWER SECTION:
devilix.org.            14400   IN      A       77.236.172.141 //We got our forward record!!!
;; AUTHORITY SECTION:
devilix.org.            14400   IN      NS      ns2.devilix.org.
devilix.org.            14400   IN      NS      ns1.abusers.eu.
devilix.org.            14400   IN      NS      devil.abusers.eu.
devilix.org.            14400   IN      NS      dev.abusers.eu.
devilix.org.            14400   IN      NS      ns2.abusers.eu.
devilix.org.            14400   IN      NS      devilix.abusers.eu.
devilix.org.            14400   IN      NS      ns1.devilix.org.
;; ADDITIONAL SECTION:
ns1.devilix.org.        14400   IN      A       127.0.0.1
ns2.devilix.org.        14400   IN      A       77.236.172.141
[root@srv1 ~]#
Code: [Select]
[root@srv1 ~]# dig -x 77.236.172.141
;; QUESTION SECTION:
;141.172.236.77.in-addr.arpa.   IN      PTR
;; ANSWER SECTION:
141.172.236.77.in-addr.arpa. 172800 IN  PTR     devilix.org. // We got our reverse record!!!
;; AUTHORITY SECTION:
172.236.77.in-addr.arpa. 172800 IN      NS      ns2.devilix.org.
172.236.77.in-addr.arpa. 172800 IN      NS      ns2.abusers.eu.
172.236.77.in-addr.arpa. 172800 IN      NS      ns1.devilix.org.
172.236.77.in-addr.arpa. 172800 IN      NS      devilix.abusers.eu.
172.236.77.in-addr.arpa. 172800 IN      NS      devil.abusers.eu.
172.236.77.in-addr.arpa. 172800 IN      NS      ns1.abusers.eu.
172.236.77.in-addr.arpa. 172800 IN      NS      dev.abusers.eu.
;; ADDITIONAL SECTION:
ns1.devilix.org.        14400   IN      A       127.0.0.1
ns2.devilix.org.        14400   IN      A       77.236.172.141
[root@srv1 ~]#
Remember this: It can take up to 1 week for your records to go around the world in all of the DNS servers so it will be visible from everywhere!!!

I`m not 100% sure that everything that I put in the files is 100% needed, but it`s working. I got my A, MX, CNAME, PTR, TXT records working. This is CentOS 6.8(Final) with CWP 0.9.8.128. Hope this can help to somebody. Sorry for my bad english.

195
This is the idea :) I have console to set it up and after I see it working to make an addon for it. Actually the addon is ready. Just the IPv6 settings for eth0 and sit0 which will be put in /etc/sysconfig/network-scripts/ifcfg-eth0 and /etc/sysconfig/network-scripts/ifcfg-sit0 have to be adjusted. But I still can`t figure it out how to make IPv6 tunnel to work on CentOS 6.8.

Pages: 1 ... 11 12 [13] 14