یادداشتهای علی انصاری

۲ مطلب در بهمن ۱۳۹۳ ثبت شده است

1) sudo apt-get install nginx phpmyadmin

توجه داشته بشید هنگام نصب phpmyadmin هیچ webserverیی را انتخاب نکنید

2) برای اجرای اسریپتهای php5 توسط nginx باید php-fpm را نصب کرده باشید که جایگزینی برای PHP FastCGI است

sudo apt-get install php5-fpm 

3) حال باید تنظمیات nginx را انجام دهید . فایل پیکربندی Nginx در آدرس زیر قرار دارد:
/etc/nginx/nginx.conf
این فایل را باز کرده و در قسمت http کد زیر را بنویسید
server {
        listen          81;
        server_name     localhost;
        root        /usr/share/phpmyadmin;
        index       index.php index.html index.htm;
        if (!-e $request_filename) {
            rewrite ^/(.+)$ /index.php?url=$1 last;
            break;
        }
        location ~ .php$ {
            try_files $uri =404;
            fastcgi_pass unix:/var/run/php5-fpm.sock;
            fastcgi_index index.php;
            include /etc/nginx/fastcgi_params;
        }
    }
۰ نظر موافقین ۰ مخالفین ۰ ۲۸ بهمن ۹۳ ، ۱۳:۲۳
علی انصاری
function getScopeList(rs) {
    var scopeList = [];
    function traverseScope(s) {
        scopeList.push(s);
        if (s.$$nextSibling) {
            traverseScope(s.$$nextSibling);
        }
        if (s.$$childHead) {
            traverseScope(s.$$childHead);
        }
    }
    traverseScope(rs);
    return scopeList;
}

scopes = getScopeList(angular.element(document.querySelectorAll("[ng-app]")).scope());
total = _.uniq(_.flatten(scopes.map(function(s) { return s.$$watchers; }))).length;
لینک
۰ نظر موافقین ۰ مخالفین ۰ ۱۶ بهمن ۹۳ ، ۰۸:۴۶
علی انصاری