GithubHelp home page GithubHelp logo

denispac / core Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jeedom/core

0.0 2.0 0.0 19.55 MB

License: GNU General Public License v3.0

PHP 69.64% CSS 1.83% JavaScript 24.44% HTML 2.50% Shell 1.60%

core's Introduction

Jeedom réalisé par Loïc Gevrey
    1) PRE-REQUIS
        - PHP 5.3
        - MySQL
        - PHP cURL
        - nodeJS
        Si vous n'avez pas encore installé les dépendances :
            apt-get update
            apt-get install nginx-common  nginx-full
            apt-get install mysql-client mysql-common mysql-server mysql-server-core
            apt-get install nodejs php5-common php5-fpm php5-cli php5-curl php5-json
        Si vous avez besoin du LDAP : 
            apt-get install php5-ldap
    2) Installation
        a) Configurer core/config/common.config.sample.php et le renommer en core/config/common.config.php
            - Configurer l'accès à la BDD
        b) En ligne de commandes exécuter php install/install.php 
       
    3) Configuration nginx 
        - Simple
            #######################################################################
            location / {
                    try_files $uri $uri/ /index.html /index.php;
            }

            location /nodeJS/ {
                    proxy_set_header X-NginX-Proxy true;
                    proxy_pass http://127.0.0.1:8070/;
                    proxy_http_version 1.1;
                    proxy_set_header Upgrade $http_upgrade;
                    proxy_set_header Connection "upgrade";
                    proxy_set_header Host $host;
                    proxy_redirect off;
            }

            location /socket.io/ {
                    proxy_pass http://127.0.0.1:8070/socket.io/;
                    proxy_http_version 1.1;
                    proxy_set_header Upgrade $http_upgrade;
                    proxy_set_header Connection "upgrade";
                    proxy_set_header Host $host;
                    proxy_redirect off;
            }

            location ~ \.php$ {
                    try_files $uri =404;
                    fastcgi_pass unix:/var/run/php5-fpm.sock;
                    fastcgi_index index.php;
                    include fastcgi_params;
            }
            #######################################################################

        - Vhosts avec SSL
            #######################################################################
            server {
                    listen       443;
                    server_name mon.domain.fr;
                    ssl          on;
                    ssl_certificate      /etc/nginx/certs/jeedom.crt;
                    ssl_certificate_key  /etc/nginx/certs/jeedom.key;

                    client_max_body_size 20M;

                    error_page  497  https://$host$request_uri;

                    proxy_set_header   Host $http_host;
                    proxy_set_header   X-Real-IP $remote_addr;
                    proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
                    proxy_set_header   X-Forwarded-Proto $scheme;

                    location /nodeJS/ {
                            proxy_set_header X-NginX-Proxy true;
                            proxy_pass http://serverIP:NodeJsPort/;
                            proxy_http_version 1.1;
                            proxy_set_header Upgrade $http_upgrade;
                            proxy_set_header Connection "upgrade";
                            proxy_set_header Host $host;
                            proxy_redirect off;
                    }      

                    location /socket.io/ {
                            proxy_pass http://serverIP:NodeJsPort/socket.io/;
                            proxy_http_version 1.1;
                            proxy_set_header Upgrade $http_upgrade;
                            proxy_set_header Connection "upgrade";
                            proxy_set_header Host $host;
                            proxy_redirect off;
                    }      


                    location ~ \.php$ {
                            try_files $uri =404;
                            fastcgi_pass unix:/var/run/php5-fpm.sock;
                            fastcgi_index index.php;
                            include fastcgi_params;
                    }

            }

            #Redirection des requêtes http en https
            server {
               listen 80;
               server_name mon.domaine.fr www.mon.domaine.fr;
               rewrite     ^(.*)   https://$server_name$1 permanent;
            }
            #######################################################################

    4) Configuration de jeedom
        a) Aller dans Admin puis récupérer la clef api
        b) Ajouter cette ligne à crontab :  "* * * * * * su --shell=/bin/bash - www-data -c "/usr/bin/php /usr/share/nginx/www/jeedom/core/php/jeeCron.php" >> /dev/null "

core's People

Contributors

denispac avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.