2013-10-03

I know. These config run very well even wildcard + www redirect works fine for webmail, but it always shows chooser.

Here are my configs:

Apache:

Code:

### begin - web of 'bitu.pl' - do not remove/modify this line

## webmail for 'bitu.pl'
<VirtualHost 127.0.0.1:30080>

    ServerName webmail.bitu.pl

    DocumentRoot "/home/kloxo/httpd/webmail"

    DirectoryIndex index.php index.html index.shtml index.htm default.htm Default.aspx Default.asp index.pl

    <IfModule mod_fastcgi.c>
        Alias /webmail.bitu.pl.0fake "/home/kloxo/httpd/webmail/webmail.bitu.pl.0fake"
        #FastCGIExternalServer "/home/kloxo/httpd/webmail/webmail.bitu.pl.0fake" -host 127.0.0.1:50000 -idle-timeout 90

        FastCGIExternalServer "/home/kloxo/httpd/webmail/webmail.bitu.pl.0fake" -socket /home/php-fpm/sock/apache.sock -idle-timeout 90
        AddType application/x-httpd-fastphp .php
        Action application/x-httpd-fastphp /webmail.bitu.pl.0fake
        <Files "webmail.bitu.pl.0fake">
            RewriteCond %{REQUEST_URI} !webmail.bitu.pl.0fake
        </Files>
    </IfModule>

    <Location />
        Allow from all
        Options +Indexes +FollowSymlinks
    </Location>

</VirtualHost>

## web for 'bitu.pl'
<VirtualHost 127.0.0.1:30080>

    ServerAdmin webmaster@bitu.pl

    ServerName bitu.pl

    ServerAlias www.bitu.pl

    DocumentRoot "/home/robomatik/bitu"

    DirectoryIndex index.php index.html index.shtml index.htm default.htm Default.aspx Default.asp index.pl

    Alias /__kloxo "/home/robomatik/kloxoscript/"

    Redirect /kloxo "https://cp.bitu.pl:7777"
    Redirect /kloxononssl "http://cp.bitu.pl:7778"

    Redirect /webmail "http://webmail.bitu.pl"

    ScriptAlias /cgi-bin/ "/home/robomatik/bitu.pl/cgi-bin/"

    <IfModule mod_fastcgi.c>
        Alias /bitu.pl.0fake "/home/robomatik/bitu/bitu.pl.0fake"
        #FastCGIExternalServer "/home/robomatik/bitu/bitu.pl.0fake" -host 127.0.0.1:57836 -idle-timeout 90

        FastCGIExternalServer "/home/robomatik/bitu/bitu.pl.0fake" -socket /home/php-fpm/sock/robomatik.sock -idle-timeout 90
        AddType application/x-httpd-fastphp .php
        Action application/x-httpd-fastphp /bitu.pl.0fake
        <Files "bitu.pl.0fake">
            RewriteCond %{REQUEST_URI} !bitu.pl.0fake
        </Files>
    </IfModule>

    <IfModule mod_php5.c>
        php_admin_value sendmail_path "/usr/sbin/sendmail -t -i"
        php_admin_value sendmail_from "bitu.pl"
    </IfModule>

    <Directory "/home/robomatik/bitu/">
        AllowOverride All
        <IfVersion < 2.4>
            Order allow,deny
            Allow from all
        </IfVersion>
        <IfVersion >= 2.4>
            Require all granted
        </IfVersion>
        Options +Indexes +FollowSymlinks
    </Directory>

    <Location />
        Options +Includes +FollowSymlinks
    </Location>

    <Location />
        <IfModule mod_php5.c>
            php_admin_value open_basedir "/home/robomatik:/tmp:/usr/share/pear:/var/lib/php/session/:/home/kloxo/httpd/script:/home/kloxo/httpd/disable/:"
        </IfModule>
    </Location>

    CustomLog "/home/httpd/bitu.pl/stats/bitu.pl-custom_log" combined
    ErrorLog "/home/httpd/bitu.pl/stats/bitu.pl-error_log"

    Alias /stats "/home/httpd/bitu.pl/webstats/"

    <Location "/stats/">
        Options +Indexes
    </Location>

</VirtualHost>

## webmail for 'bitu.pl'
<VirtualHost 127.0.0.1:30443>

    ServerName webmail.bitu.pl

    DocumentRoot "/home/kloxo/httpd/webmail"

    DirectoryIndex index.php index.html index.shtml index.htm default.htm Default.aspx Default.asp index.pl

    <IfModule mod_ssl.c>
        SSLEngine On
        SSLCertificateFile /home/kloxo/httpd/ssl/eth0___localhost.crt
        SSLCertificateKeyFile /home/kloxo/httpd/ssl/eth0___localhost.key
        SSLCACertificatefile /home/kloxo/httpd/ssl/eth0___localhost.ca
    </IfModule>

    <IfModule mod_fastcgi.c>
        Alias /webmail.bitu.pl.1fake "/home/kloxo/httpd/webmail/webmail.bitu.pl.1fake"
        #FastCGIExternalServer "/home/kloxo/httpd/webmail/webmail.bitu.pl.1fake" -host 127.0.0.1:50000 -idle-timeout 90

        FastCGIExternalServer "/home/kloxo/httpd/webmail/webmail.bitu.pl.1fake" -socket /home/php-fpm/sock/apache.sock -idle-timeout 90
        AddType application/x-httpd-fastphp .php
        Action application/x-httpd-fastphp /webmail.bitu.pl.1fake
        <Files "webmail.bitu.pl.1fake">
            RewriteCond %{REQUEST_URI} !webmail.bitu.pl.1fake
        </Files>
    </IfModule>

    <Location />
        Allow from all
        Options +Indexes +FollowSymlinks
    </Location>

</VirtualHost>

## web for 'bitu.pl'
<VirtualHost 127.0.0.1:30443>

    ServerAdmin webmaster@bitu.pl

    ServerName bitu.pl

    ServerAlias www.bitu.pl

    <IfModule mod_ssl.c>
        SSLEngine On
        SSLCertificateFile /home/kloxo/httpd/ssl/eth0___localhost.crt
        SSLCertificateKeyFile /home/kloxo/httpd/ssl/eth0___localhost.key
        SSLCACertificatefile /home/kloxo/httpd/ssl/eth0___localhost.ca
    </IfModule>

    DocumentRoot "/home/robomatik/bitu"

    DirectoryIndex index.php index.html index.shtml index.htm default.htm Default.aspx Default.asp index.pl

    Alias /__kloxo "/home/robomatik/kloxoscript/"

    Redirect /kloxo "https://cp.bitu.pl:7777"
    Redirect /kloxononssl "http://cp.bitu.pl:7778"

    Redirect /webmail "https://webmail.bitu.pl"

    ScriptAlias /cgi-bin/ "/home/robomatik/bitu.pl/cgi-bin/"

    <IfModule mod_fastcgi.c>
        Alias /bitu.pl.1fake "/home/robomatik/bitu/bitu.pl.1fake"
        #FastCGIExternalServer "/home/robomatik/bitu/bitu.pl.1fake" -host 127.0.0.1:57836 -idle-timeout 90

        FastCGIExternalServer "/home/robomatik/bitu/bitu.pl.1fake" -socket /home/php-fpm/sock/robomatik.sock -idle-timeout 90
        AddType application/x-httpd-fastphp .php
        Action application/x-httpd-fastphp /bitu.pl.1fake
        <Files "bitu.pl.1fake">
            RewriteCond %{REQUEST_URI} !bitu.pl.1fake
        </Files>
    </IfModule>

    <IfModule mod_php5.c>
        php_admin_value sendmail_path "/usr/sbin/sendmail -t -i"
        php_admin_value sendmail_from "bitu.pl"
    </IfModule>

    <Directory "/home/robomatik/bitu/">
        AllowOverride All
        <IfVersion < 2.4>
            Order allow,deny
            Allow from all
        </IfVersion>
        <IfVersion >= 2.4>
            Require all granted
        </IfVersion>
        Options +Indexes +FollowSymlinks
    </Directory>

    <Location />
        Options +Includes +FollowSymlinks
    </Location>

    <Location />
        <IfModule mod_php5.c>
            php_admin_value open_basedir "/home/robomatik:/tmp:/usr/share/pear:/var/lib/php/session/:/home/kloxo/httpd/script:/home/kloxo/httpd/disable/:"
        </IfModule>
    </Location>

    CustomLog "/home/httpd/bitu.pl/stats/bitu.pl-custom_log" combined
    ErrorLog "/home/httpd/bitu.pl/stats/bitu.pl-error_log"

    Alias /stats "/home/httpd/bitu.pl/webstats/"

    <Location "/stats/">
        Options +Indexes
    </Location>

</VirtualHost>

### end - web of 'bitu.pl' - do not remove/modify this line

nginx:

Code:

### begin - web of 'bitu.pl' - do not remove/modify this line

## webmail for 'bitu.pl'
server {
    listen 0.0.0.0:80;
    listen [::]:80;

    server_name webmail.bitu.pl;

    index index.php index.html index.shtml index.htm default.htm Default.aspx Default.asp index.pl;

    set $rootdir '/home/kloxo/httpd/webmail';

    root $rootdir;

    include '/home/nginx/conf/globals/custom.proxy.conf';
}

## web for 'bitu.pl'
server {
    listen 0.0.0.0:80;
    listen [::]:80;

    server_name bitu.pl www.bitu.pl;

    index index.php index.html index.shtml index.htm default.htm Default.aspx Default.asp index.pl;

    set $domain 'bitu.pl';

    set $rootdir '/home/robomatik/bitu';

    root $rootdir;

    set $user 'robomatik';

    set $fpmport '57836';

    include '/home/nginx/conf/globals/custom.proxy.conf';

    include '/home/nginx/conf/globals/generic.conf';
}

## webmail for 'bitu.pl'
server {
    listen 0.0.0.0:443;
    listen [::]:443;

    ssl on;
    ssl_certificate /home/kloxo/httpd/ssl/eth0___localhost.crt;
    ssl_certificate_key /home/kloxo/httpd/ssl/eth0___localhost.key;
    ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers HIGH:!aNULL:!MD5;

    server_name webmail.bitu.pl;

    index index.php index.html index.shtml index.htm default.htm Default.aspx Default.asp index.pl;

    set $rootdir '/home/kloxo/httpd/webmail';

    root $rootdir;

    include '/home/nginx/conf/globals/custom.proxy.conf';
}

## web for 'bitu.pl'
server {
    listen 0.0.0.0:443;
    listen [::]:443;

    ssl on;
    ssl_certificate /home/kloxo/httpd/ssl/eth0___localhost.crt;
    ssl_certificate_key /home/kloxo/httpd/ssl/eth0___localhost.key;
    ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers HIGH:!aNULL:!MD5;

    server_name bitu.pl www.bitu.pl;

    index index.php index.html index.shtml index.htm default.htm Default.aspx Default.asp index.pl;

    set $domain 'bitu.pl';

    set $rootdir '/home/robomatik/bitu';

    root $rootdir;

    set $user 'robomatik';

    set $fpmport '57836';

    include '/home/nginx/conf/globals/custom.proxy.conf';

    include '/home/nginx/conf/globals/generic.conf';
}

### end - web of 'bitu.pl' - do not remove/modify this line

Statistics: Posted by Spacedust — Fri Oct 04, 2013 1:55 am

Show more