Konuyu Oyla:
  • Toplam: 1 Oy - Ortalama: 2
  • 1
  • 2
  • 3
  • 4
  • 5
ehcp ver 0.30.6, nginx template
#1
nginx template code to enable webmail, roundcube, etc.
to activate this, put in apachetemplate file in ehcp, then, ehcp->options->syncdomains.

Kod:
# this file used in Easy Hosting Control Panel (ehcp), www.ehcp.net
# webserver config file for nginx webserver

server {
        listen   80;
        server_name  {domainname} www.{domainname} {wildcarddomain}; # this is changed to *.{domainname} within classapp.php

        access_log  {homedir}/logs/access_log;
        error_log  {homedir}/logs/error_log;
        access_log /var/log/apache_common_access_log;
        

        
        root   {homedir}/httpdocs;
        index   index.html index.htm index.php;
        

        location ~ \.php$ {
                try_files $uri = 404;
                fastcgi_pass   127.0.0.1:9000;
                fastcgi_index  index.php;
                fastcgi_param  SCRIPT_FILENAME  {homedir}/httpdocs$fastcgi_script_name;
                fastcgi_param  PHP_ADMIN_VALUE "open_basedir={homedir}:/tmp:/usr/share/php:/usr/share/pear";
                include fastcgi_params;
                fastcgi_read_timeout 300;
        }

        location /phpmyadmin {
                root /usr/share/;
                index index.php index.html index.htm;
                location ~ ^/phpmyadmin/(.+\.php)$ {
                   try_files $uri =404;
                   root /usr/share/;
                   fastcgi_pass 127.0.0.1:9000;
                   fastcgi_index index.php;
                   fastcgi_param SCRIPT_FILENAME $request_filename;
                   include /etc/nginx/fastcgi_params;
                }
                location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
                           root /usr/share/;
                }
        }

        location /phpMyAdmin {
                   rewrite ^/* /phpmyadmin last;
        }

        location /webmail {
           root /var/www/new/ehcp/;
           index index.php index.html index.htm;
           location ~ ^/webmail/(.+\.php)$ {
                   try_files $uri =404;
                   root /var/www/new/ehcp/;
                   fastcgi_pass 127.0.0.1:9000;
                   fastcgi_index index.php;
                   fastcgi_param SCRIPT_FILENAME $request_filename;
                   include /etc/nginx/fastcgi_params;                      
           }

           location ~* ^/webmail/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
                           root /var/www/new/ehcp/;
           }
        }

        location /roundcube {
           root /usr/share/;
           index index.php index.html index.htm;
           location ~ ^/roundcube/(.+\.php)$ {
                   try_files $uri =404;
                   root /usr/share/;
                   fastcgi_pass 127.0.0.1:9000;
                   fastcgi_index index.php;
                   fastcgi_param SCRIPT_FILENAME $request_filename;
                   include /etc/nginx/fastcgi_params;
           }
           location ~* ^/roundcube/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
                           root /usr/share/;
           }
        }

        # any files that should be avoided, may be put here:
        location ~ (apache_subdomain_template|apachetemplate|apachetemplate_ipbased|apachetemplate_passivedomains|/\.conf$|/\.ht|access_log|error_log|access\.log|error\.log) {  
                        deny  all;
        }
}

server {
        listen   80;
        server_name  mymail.{domainname} www.mymail.{domainname};

  

               root /usr/share/roundcube/;
               index index.php index.html index.htm;
                location ~ \.php$ {
                       try_files $uri =404;
                       root /usr/share/roundcube/;
                       fastcgi_pass 127.0.0.1:9000;
                       fastcgi_index index.php;
                       fastcgi_param SCRIPT_FILENAME $request_filename;
                       include /etc/nginx/fastcgi_params;
               }

                location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt|htm)$ {
                root /usr/share/roundcube/;
                }
}


server {
        listen   80;
        server_name  mail.{domainname} www.mail.{domainname};

               root /var/www/new/ehcp/webmail/;
               index index.php index.html index.htm;
               location ~ \.php$ {
                       try_files $uri =404;
                       root /var/www/new/ehcp/webmail/;
                       fastcgi_pass 127.0.0.1:9000;
                       fastcgi_index index.php;
                       fastcgi_param SCRIPT_FILENAME $request_filename;
                       include /etc/nginx/fastcgi_params;
               }
               location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt|htm)$ {
                       root /var/www/new/ehcp/webmail/;
               }
}

server{
        listen   80;
               server_name mysql.{domainname} www.mysql.{domainname};
               root /usr/share/phpmyadmin/;
               index index.php index.html index.htm;
               location ~ \.php$ {
                       try_files $uri =404;
                       root /usr/share/phpmyadmin/;
                       fastcgi_pass 127.0.0.1:9000;
                       fastcgi_index index.php;
                       fastcgi_param SCRIPT_FILENAME $request_filename;
                       include /etc/nginx/fastcgi_params;
               }
               location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt)$ {
                       root /usr/share/phpmyadmin/;
               }
}

server{
              listen   80;
              server_name chive.{domainname} www.chive.{domainname};
              root /var/www/new/ehcp/chive/;
              index index.php index.html index.htm;
              try_files $uri $uri/ /index.php;
                
              location ~ \.php$ {
                try_files $uri = 404;
                fastcgi_pass   127.0.0.1:9000;
                fastcgi_index  index.php;
                fastcgi_param SCRIPT_FILENAME $request_filename;
                include /etc/nginx/fastcgi_params;
               }


                location ~ ^(protected|framework|themes/\w+/views) {
                deny  all;
                }
}
Ara
Cevapla PGM
Teşekkür verenler:
#2
Thanks :)
Cevapla PGM
Teşekkür verenler:
#3
Thanks...
Ara
Cevapla PGM
Teşekkür verenler:
#4
Ne işe yarıyor bu ?
Ara
Cevapla PGM
Teşekkür verenler:
#5
Thanks...
Ara
Cevapla PGM
Teşekkür verenler:
#6
(16-02-2012 Saat: 11:14)bladehood Nickli Kullanıcıdan Alıntı: Ne işe yarıyor bu ?

:( arkadaşım adam ingilizce vermiş ingilizce biliyor türkçe bilmiyor belki.
Alıntı:Turkish man, you know my friend does not know English, perhaps given in English.

Den translated into Google Translate
Ara
Cevapla PGM
Teşekkür verenler:
#7
Thanks
Ara
Cevapla PGM
Teşekkür verenler:
#8
Thank you. a good thing for me
Ara
Cevapla PGM
Teşekkür verenler:
#9
(16-02-2012 Saat: 13:27)rayray93 Nickli Kullanıcıdan Alıntı: :( arkadaşım adam ingilizce vermiş ingilizce biliyor türkçe bilmiyor belki.

Türkçe biliyor o :D

Cevapla PGM
Teşekkür verenler:
#10
Thank you for sharing.
Ara
Cevapla PGM
Teşekkür verenler:


Hızlı Menü:


Şu anda bu konuyu okuyanlar: 3 Ziyaretçi


Online Shopping App
Online Shopping - E-Commerce Platform
Online Shopping - E-Commerce Platform
Feinunze Schmuck Jewelery Online Shopping