Redirect listener

  • Hi


    Just a little questión if someone has the answer


    I´ve implemented a listener which contains a redirect directive like this


    " RedirectMatch permanent ^(/(?:pma|webmail|ftp)[\/]?)\$ {BASE_SERVER_VHOST_PREFIX}{BASE_SERVER_VHOST}\:8080\$1\n"


    This directive returns this answer http://admin.server.maindomain.com:8080/pma. and it is OK :D


    My question is, what should I put in this directive to get this answer http://domain.com:8080/ftp ?


    Thanks in advance. :/

    Victor Rodriguez A.


    Wheezy
    FCGI
    PHP 5.4.36-0
    Nginx/1.6.2
    MYSQL 5.5.41-0

  • Hello ;


    You must use the PanelRedirect plugin which provides the proxy method. Here you're reinventing the wheel ;)

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Hi Nuxwin thanks for your replay, but my real situatión is this


    In the server, in /var/www/imscp/gui/public/tools the Owncloud, PhpPgadmin and Adminer (for Mysql and Postgres) are installed and they work just fine with the listener and if a cliente writes domain.com/pga redirects the request to hhtp://admin.server.domain.com:8080/tools/PhpPgAdmin and it is OK.


    But what I want, is that if a cliente writes domain.com/pma|ftp|webmail it should be redirected to domain.com:8080/pma|ftp|webmail.


    I thougth that it could be done with the PanelRedirect plugins but I don't know what it does or what else should I do because I've installed and activated this plugins but nothing happened.


    Could you give me any advice to make PanelRedirect plugins work in this way domain.com:8080/pma|ftp|webmail, and not in hhtp://admin.server.domain.com:8080/pma|ftp|webmail?


    Thanks in advance


    Victor


    Panel 1.2.2
    Wheezy
    FCGI
    PHP 5.4.36-0
    Nginx/1.6.2
    MYSQL 5.5.41-0

  • Hello ;


    You should not pollute your customers domains with those aliases... The PanelRedirect plugin allow to redirect any request for the panel made on common ports ( 80, 443) to the nginx server on specific ports (8080 , 4443).


    Here, what you want do is to create ftp, pma, webmail aliases for your customers's domain, which is really bad. In ispCP those aliases were provided but this is not recommended because you should never pollute your customer''s domains. Eg, what if one of your customer installs an application which provide a directory that is reachable through /ftp ?


    The only exception we made for now is to provide the /stats alias ( which is also bad ) but in version 2.0.0, we 'll change that too ;)


    So no, I'll not give you the solution here ;) You must look at the http://httpd.apache.org/docs/2.2/fr/mod/mod_proxy.html to learn how to do ;)

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206