Posts by lorus

    @Nuxwin
    Since I can't find this in the changelogs may I ask if this ever has been implemented or has it been postponed or dropped?
    I ask because it sounded very interesting.

    Hi,


    since updating to imscp 1.2.17 (from 1.2.1) I have the problem that over time more and more apache processes are spawned that constantly consume 100% cpu each.



    Code
    1. # top
    2. PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    3. 5547 www-data 20 0 244964 16556 4688 S 125.0 0.8 64:09.13 apache2
    4. 4036 www-data 20 0 246248 17848 4664 S 100.1 0.9 327:30.57 apache2
    5. 5912 www-data 20 0 239296 8820 3444 S 74.8 0.4 3:50.93 apache2
    6. ...

    Can you help me to find out, whats going wrong here?
    I'm using Ubuntu 14.04 and imscp is configured with php-fpm.

    Here, you must install the PanelRedirect plugin to proxy the requests for your hosting domain made on ports 80/443 to nginx on specific ports.


    This is exactly what I've tried, but the plugin doesn't resolves the issue. I've tried to describe this in Post 33390 with as much information I was able to gather


    I've no further idea, so I would be very thankful if you could help me digging deeper.

    That faulty redirection was active since I've updated from 1.1.5 to 1.2.2.
    I was suggested to fix that with installing the PanelRedirect plugin. After activating the plugin the issue wasn't fixed, so deinstalling the plugin again won't fix the problem either.


    Tried this and still:


    https://hosting.fqdn.tld:443 is 301 redirected to http://customerX.tld:80
    http://hosting.fqdn.tld:80 is 301 redirected to http://sub.customerY.tld:80


    Maybe this is useful:


    https://hosting.fqdn.tld:443 is 301 redirected to http://customerX.tld:80
    http://hosting.fqdn.tld:80 is 301 redirected to http://sub.customerY.tld:80


    vhost configs for PanelRedirect seems present at the right place

    Code
    1. # ls -ahl /etc/imscp/apache/working | grep PanelRedirect-rw-r--r-- 1 root root 371 Apr 8 22:49 PanelRedirect.conf-rw-r--r-- 1 root root 511 Apr 8 22:49 PanelRedirect_ssl.conf


    /etc/imscp/apache/working/PanelRedirect_ssl.conf

    Code
    1. # BEGIN Plugin::PanelRedirect<VirtualHost xx.xxx.xx.xxx:443> ServerName hosting.fqdn.tld ServerAdmin [email protected] ErrorLog /var/log/apache2/hosting.fqdn.tld/error.log SSLProxyEngine On ProxyPass / https://hosting.fqdn.tld:4443/ ProxyPassReverse / https://hosting.fqdn.tld:4443/ SSLEngine On SSLCertificateFile /etc/imscp/hosting.fqdn.tld.pem SSLCertificateChainFile /etc/imscp/hosting.fqdn.tld.pem</VirtualHost># END Plugin::PanelRedirect


    /etc/imscp/apache/working/PanelRedirect.conf

    Code
    1. # BEGIN Plugin::PanelRedirect<VirtualHost xx.xxx.xx.xxx:80> ServerName hosting.fqdn.tld ServerAdmin [email protected] ErrorLog /var/log/apache2/hosting.fqdn.tld/error.log # SECTION VHOST_PREFIX != http:// BEGIN. Redirect / https://hosting.fqdn.tld/ # SECTION VHOST_PREFIX != http:// END.</VirtualHost># END Plugin::PanelRedirect



    But it seems this configurations are being overwritten by customer vhost ...


    Code
    1. # apache2ctl -SVirtualHost configuration:xx.xxx.xx.xxx:443 customerX.tld (/etc/apache2/sites-enabled/customer1-domain.tld.conf:1)xx.xxx.xx.xxx:80 is a NameVirtualHost default server sub.customerY.tld (/etc/apache2/sites-enabled/sub.customerY.tld.conf:1)....ServerRoot: "/etc/apache2"Main DocumentRoot: "/var/www"Main ErrorLog: "/var/log/apache2/error.log"Mutex rewrite-map: using_defaultsMutex ssl-stapling: using_defaultsMutex proxy: using_defaultsMutex ssl-cache: using_defaultsMutex default: dir="/var/lock/apache2" mechanism=fcntlMutex mpm-accept: using_defaultsMutex watchdog-callback: using_defaultsPidFile: "/var/run/apache2/apache2.pid"Define: DUMP_VHOSTSDefine: DUMP_RUN_CFGUser: name="www-data" id=33Group: name="www-data" id=33


    customer1-domain.tld.conf

    Code
    1. <VirtualHost xx.xxx.xx.xxx:443> ServerAdmin [email protected] ServerName customerX.tld ServerAlias www.customerX.tld vu2003.hosting.fqdn.tld LogLevel error ErrorLog /var/log/apache2/customerX.tld/error.log DocumentRoot /var/www/virtual/customerX.tld/htdocs Alias /errors /var/www/virtual/customerX.tld/errors/ # SECTION suexec BEGIN. SuexecUserGroup vu2003 vu2003 # SECTION suexec END. # SECTION php_enabled BEGIN. # SECTION php_fpm BEGIN. <IfVersion < 2.4.9> Alias /php5-fcgi /var/lib/apache2/fastcgi/php5-fcgi-customerX.tld-ssl FastCGIExternalServer /var/lib/apache2/fastcgi/php5-fcgi-customerX.tld-ssl \ -socket /var/run/php5-fpm-customerX.tld.socket \ -idle-timeout 900 \ -pass-header Authorization </IfVersion> <IfVersion >= 2.4.9> SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1 <Proxy "unix:/var/run/php5-fpm-customerX.tld.socket|fcgi://php5-fpm"> ProxySet disablereuse=off </Proxy> <FilesMatch "\.php5?$"> SetHandler proxy:fcgi://php5-fpm </FilesMatch> </IfVersion> # SECTION php_fpm END. # SECTION php_enabled END. <Directory /var/www/virtual/customerX.tld> Options +SymLinksIfOwnerMatch Require all granted </Directory> <Directory /var/www/virtual/customerX.tld/htdocs> # SECTION php_enabled BEGIN. AllowOverride All # SECTION php_enabled END. </Directory> # SECTION cgi_support BEGIN. ScriptAlias /cgi-bin/ /var/www/virtual/customerX.tld/cgi-bin/ <Directory /var/www/virtual/customerX.tld/cgi-bin> AllowOverride AuthConfig Indexes Limit </Directory> # SECTION cgi_support END. # SECTION addons BEGIN. # SECTION addons END. SSLEngine On SSLCertificateFile /var/www/imscp/gui/data/certs/customerX.tld.pem SSLCertificateChainFile /var/www/imscp/gui/data/certs/customerX.tld.pem Include /etc/apache2/imscp/customerX.tld.conf</VirtualHost>


    /etc/apache2/sites-enabled/sub.customerY.tld.conf

    Quote

    Wait what? Is it really a redirect (url changes) or just another content? Also is domain.tld your panel domain?


    Its a 301 redirect


    Quote

    Distribution in use (Identifiant and codename)


    Code
    1. lsb_release -a
    2. No LSB modules are available.
    3. Distributor ID: Ubuntu
    4. Description: Ubuntu 14.04.2 LTS
    5. Release: 14.04
    6. Codename: trusty


    Quote

    i-MSCP version in use (Version and codename)


    i-MSCP 1.2.2
    Build: 20150212
    Codename: Andromeda


    Quote

    Server implementation in use (dovecot or courier, Apache ITK, Apache FPM or Apache FCGID...)


    dovecot, Apache FPM


    Quote

    The logs from /var/log/imscp which are filled only when the debug mode is enabled in your /etc/imscp/imscp.conf file.Any relevant logs which belong to the service that cause a problem


    Can you please say me, which logs are relevant to resolve this issue?

    Thanks for that hint, I've installed the PanelRedirect plugin and now


    Code
    1. https://domain.tld


    redirects to another customer domain :-/


    plugins/PanelRedirect/config.php

    Code
    1. return array(
    2. // Redirection type ( default: proxy )
    3. // Possible values: proxy, redirect
    4. 'type' => 'proxy'
    5. )

    I have the very same problem after upgrading from 1.1.13 to 1.2.2


    panel was previously available under

    Code
    1. https://domain.tld[:433]


    Now

    Code
    1. https://domain.tld[:433]

    maps to a (random) customer domain and the panel is reachable under


    Code
    1. https://domain.tld:4443


    I've tried to switch back the panel to port 443 via autoinstaller but got the error


    "The Port '443' is reserved or not valid."



    How can this be resolved?