Posts by VirtualCed

    Hello


    I'm moving a WordPress site from GoDaddy to my I-MSCP environment.
    But I have always error 500 (even the wp-debug function doesn't produce anything).
    I use in the past in case of error like this to have a look in the logs.
    But the log are really not explicit.


    Code
    1. 89.168.185.xxx - - [27/Jan/2016:15:05:51 +0100] "GET / HTTP/1.1" 500 - "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36"


    And nothing relevant in Error.log.


    I've changed manually the apache config for this particular host by changing this


    Code
    1. LogLevel debug
    2. ErrorLog /var/log/apache2/manulemire.com/error.log

    What can I do to have a more verbose logging to try to find where is this Error 500 coming from ?


    Best regards
    Cedric

    Seeking help on the above... it looks like isp-control.net site is down for good, so I can't see how to decrypt.


    VirtualCed are you able to shed some light on this or TheCry? Just need to decrypt the passwords to make my migration out of ISPCP easier!

    Here is the original message :


    [Shell] Decrypt Mailpasswords - Knut - 01-21-2009 03:59 AM




    In some cases, I need the decrypted password of a user's mail.
    To make it easier for me, I have written a small php-shell-script.




    Here we go:
    (of course you need php-cli)




    1. Save this code over here -> /root/bin




    PHP Code:
    #!/usr/bin/php -q




    <?php




    ## Autor: Knut Herter
    ## Datum: 06.10.2009
    ## Web : http://www.systemtechnics.de
    ##
    ## Usage: decrypt_mailpw.php |grep whatever_you_want
    ##
    ## Example: decrypt_mailpw.php |grep admin







    ###
    # FIRST CHANGE THIS VALUES !
    ###




    $SQLHST = "localhost";
    $SQLUSR = "root";
    $ISPCPDB = "ispcp";




    # if error_reporting on, you see some session errors at cli
    error_reporting(0);




    #################################
    #### Do not change from here ####




    echo "MySQL password for $SQLUSR@$SQLHST: ";
    system('stty -echo');
    $SQLPW = trim(fgets(STDIN));
    system('stty echo');




    $QUERY = "
    SELECT `mail_users`.mail_acc,
    `mail_users`.mail_pass,
    `domain`.domain_name




    FROM `domain`




    INNER JOIN `mail_users` ON (`mail_users`.domain_id = `domain`.domain_id)




    WHERE `mail_type` LIKE 'normal_mail' OR `mail_type` LIKE 'normal_mail,normal_forward'";




    require '/var/www/ispcp/gui/include/ispcp-lib.php';




    $link = mysql_connect( $SQLHST, $SQLUSR, $SQLPW);
    if (!$link) {
    die('keine Verbindung möglich: ' . mysql_error());
    }




    mysql_select_db( $ISPCPDB, $link) or die('Could not select database.');




    $result = mysql_query($QUERY);
    if (!$result) {
    die('Ungültige Abfrage: ' . mysql_error());
    }




    $FORMAT = "Domain MailAdr: [ %s@%s ] Passwort: [ %s ]\n";
    while ($row = mysql_fetch_row($result)) {
    printf ( $FORMAT, $row[0], $row[2], decrypt_db_password ($row[1]));
    }
    printf ("\n");




    mysql_close($link);




    ####### DOMAINALIASE




    $QUERY = "
    SELECT `mail_users`.mail_acc,
    `mail_users`.mail_pass,
    `domain_aliasses`.alias_name




    FROM `domain_aliasses`




    INNER JOIN `mail_users` ON (`mail_users`.sub_id = `domain_aliasses`.alias_id)




    WHERE `mail_type` LIKE 'alias_mail' OR `mail_type` LIKE 'alias_mail,alias_forward'";










    $link = mysql_connect( $SQLHST, $SQLUSR, $SQLPW);
    if (!$link) {
    die('keine Verbindung möglich: ' . mysql_error());
    }




    mysql_select_db( $ISPCPDB, $link) or die('Could not select database.');




    $result = mysql_query($QUERY);
    if (!$result) {
    die('Ungültige Abfrage: ' . mysql_error());
    }







    $FORMAT = "Aliasdomain MailAdr: [ %s@%s ] Passwort: [ %s ]\n";
    while ($row = mysql_fetch_row($result)) {
    printf ( $FORMAT, $row[0], $row[2], decrypt_db_password ($row[1]));
    }
    printf ("\n");




    mysql_close($link);







    2. make it executable




    Code:
    chmod +x /root/bin/decrypt_mailpw.php




    3. run :-)




    4. If you want a special mailpassword, run with grep
    example:Code:
    decrypt_mailpw.php |grep webmaster
    orCode:
    decrypt_mailpw.php |grep mydomain.de

    Hello,


    I have a technical question.
    To add the certificates to the customer when using the interface, does the system do another thing that just adding three fields in the database ?
    I'd like to automatize the process and as I use to make shell batch scripts, Right now, I do the generation of the certs in the scripts, and I do the update of Wordpress database in the same time, replacing http strings by https.
    I I'm able to set up the certificate in the meantime, it would be really nice for me.
    I know who to make the SQL Queries from the shell, but just want to be sure it's enough to set it up....


    Best regards
    Cedric

    Hello


    I'm interested to install Pikwik instead of AwStats or in complement


    I've found this http://wiki.i-mscp.net/doku.ph…howto:use_piwik_for_stats
    But no idea if it's still valid. So I give a try.


    I was able to install Piwik, to configure it, and to import the logs of all the website.
    For the logs, I have a doubt. I'm reading the file /var/log/apache2/$DOMAIN/access.log
    But what about the /var/log/apache2/$DOMAIN/error.log ? Sounds it's important to import data if there are some data in those logs.


    My question is about the authentification of the users to access their own data.


    I see the Alias /stats but in the actual file, for AwStats, there is a http authenticate process.


    How will it work for users with piwik ?


    I don't want to kill awstats now, so I plan to create a /piwik alias.


    Should I copy the parameters used for the aWstats ?

    I don't know if there are still people reading here.


    I have an idea that should be written in a plugin, but I don't have the knowledge to code it.
    Right now I'm doing a part manually and a part with a shell script I invoke manually in command line


    The manual part :
    - create a second database with _dev at the end
    - assign the same user to this database
    - create a subdomain dev.DOMAINNAME


    Those operations should have been done using the CLI Command for IMSCP but they are not available anymore. I'm sure there is a possibility to do this using a button in a plugin.


    Then I call a shell script (this is the raw script, no control done, should be added (is the DB Dev available, is the DEV subdomain available, etc...)


    The 13th and 14th line just add the site to my wordshell list of sites and the 15th make a search and replace in the database to change all the url link to the dev site.


    I'm sure a lot of people hosts Wordpress sites.
    It's really interesting to have this feature before doing some change to a website, to have an instant clone of the website to be able to work on the dev stage.


    After the changes made, I don't know what's the best way to do.
    Either perform the same push from dev to prod (risk : there are some changes in prod between your dump and you GoToLive)
    Either you know those changes are ok, you can do the same in prod (risk : you don't make the change the exact same manner and you fail)


    So I think it could be an interesting plugin.


    Cedric

    Hello


    I don't know which upgrade causes the issue.
    I'm on Ubuntu 14.04 and now i-mscp 1.2.8


    When I was in 1.2.2 I was able to connect to IMAPS/POP3S and SMTPS with the same certificate I use for the panel.


    I even made a screenflow recording the installation of an account in GMAIL using the POP3S to my server.
    A user called me today as she is unable to connect the same way I did in the video.
    I checked and indeed Gmail told me the connection uses a self signed certificate and not the one I'm using for the main domain.


    I've no idea where I have to look to change this behaviour.


    Code
    1. # Servers# Please, do not change these parameters manually# Run the i-MSCP installer as follow:# imscp-autoinstall -dr serversFRONTEND_SERVER = nginxSQL_SERVER = mysql_5.5PO_SERVER = dovecotNAMED_SERVER = bindHTTPD_SERVER = apache_itkFTPD_SERVER = proftpdMTA_SERVER = postfix


    When I test the certificate it seems Dovecot does not use the same certs as the webserver of the panel.


    Test of the cert on the panel :

    Code
    1. openssl s_client -showcerts -connect control.cqfd.net:443---Server certificatesubject=/OU=Domain Control Validated/CN=control.cqfd.netissuer=/C=US/ST=Arizona/L=Scottsdale/O=Starfield Technologies, Inc./OU=http://certs.starfieldtech.com/repository//CN=Starfield Secure Certificate Authority - G2---


    Test of the cert on the pop3 server :


    Code
    1. openssl s_client -showcerts -connect control.cqfd.net:995
    2. ---
    3. Server certificate
    4. subject=/O=Dovecot mail server/OU=localhost/CN=localhost/emailAddress=root@localhost
    5. issuer=/O=Dovecot mail server/OU=localhost/CN=localhost/emailAddress=root@localhost
    6. ---

    Fixed that the RoundcubePlugins didn't load the managesieve plugin


    Code
    1. cp /var/cache/imscp/packages/vendor/imscp/roundcube/src/plugins /managesieve /var/www/imscp/gui/public/tools/webmail/plugins/ -R


    This command did the trick for me @VirtualCed

    Isn't there a space unwanted in this line ?


    Shouldn't it be



    Shell-Script
    1. cp /var/cache/imscp/packages/vendor/imscp/roundcube/src/plugins/managesieve /var/www/imscp/gui/public/tools/webmail/plugins/ -R