Skip to content

Instantly share code, notes, and snippets.

@crushcafeteria
Created June 29, 2017 08:16
Show Gist options
  • Select an option

  • Save crushcafeteria/3bcf0afa8f6e6042ef491643d9c93ba5 to your computer and use it in GitHub Desktop.

Select an option

Save crushcafeteria/3bcf0afa8f6e6042ef491643d9c93ba5 to your computer and use it in GitHub Desktop.

Revisions

  1. @dikaio dikaio revised this gist Mar 20, 2017. 3 changed files with 9 additions and 20 deletions.
    File renamed without changes.
    9 changes: 9 additions & 0 deletions guide.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    1. `mkdir /var/www/laravel`
    2. `vim /etc/nginx/sites-available/default` #replace default with https://gist.github.com/dikaio/601ec9b09b5a282db8b78ab89f1ad92b
    3. `vim /etc/php/7.0/fpm/php.ini` #change cgi.fix_pathinfo=1 with 0=
    4. `vim /etc/php/7.0/fpm/pool.d/www.conf` #change line, `listen = 127.0.0.1:9000` to `listen = /run/php/php7.0-fpm.sock`
    5. sudo service php7.0-fpm restart && sudo service nginx restart
    6. curl -sS https://getcomposer.org/installer | php
    7. mv composer.phar /usr/local/bin/composer
    8. composer create-project laravel/laravel /var/www/laravel/ 4.2
    9. chgrp -R www-data /var/www/laravel && chmod -R 775 /var/www/laravel/app/storage
    20 changes: 0 additions & 20 deletions steps.md
    Original file line number Diff line number Diff line change
    @@ -1,20 +0,0 @@
    1. mkdir /var/www/laravel

    **replace default with https://gist.github.com/dikaio/601ec9b09b5a282db8b78ab89f1ad92b**
    2. vim /etc/nginx/sites-available/default

    **change cgi.fix_pathinfo=1 with 0=**
    3. vim /etc/php/7.0/fpm/php.ini

    **Open and change the line, listen = 127.0.0.1:9000, and change the 127.0.0.1:9000 to listen = /run/php/php7.0-fpm.sock**
    4. vim /etc/php/7.0/fpm/pool.d/www.conf

    5. sudo service php7.0-fpm restart && sudo service nginx restart

    6. curl -sS https://getcomposer.org/installer | php

    7. mv composer.phar /usr/local/bin/composer

    8. composer create-project laravel/laravel /var/www/laravel/ 4.2

    9. chgrp -R www-data /var/www/laravel && chmod -R 775 /var/www/laravel/app/storage
  2. @dikaio dikaio revised this gist Mar 20, 2017. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions steps.md
    Original file line number Diff line number Diff line change
    @@ -1,12 +1,12 @@
    1. mkdir /var/www/laravel

    # replace default with https://gist.github.com/dikaio/601ec9b09b5a282db8b78ab89f1ad92b
    **replace default with https://gist.github.com/dikaio/601ec9b09b5a282db8b78ab89f1ad92b**
    2. vim /etc/nginx/sites-available/default

    # change cgi.fix_pathinfo=1 with 0=
    **change cgi.fix_pathinfo=1 with 0=**
    3. vim /etc/php/7.0/fpm/php.ini

    # Open and change the line, listen = 127.0.0.1:9000, and change the 127.0.0.1:9000 to listen = /run/php/php7.0-fpm.sock
    **Open and change the line, listen = 127.0.0.1:9000, and change the 127.0.0.1:9000 to listen = /run/php/php7.0-fpm.sock**
    4. vim /etc/php/7.0/fpm/pool.d/www.conf

    5. sudo service php7.0-fpm restart && sudo service nginx restart
  3. @dikaio dikaio revised this gist Mar 20, 2017. 1 changed file with 20 additions and 0 deletions.
    20 changes: 20 additions & 0 deletions steps.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    1. mkdir /var/www/laravel

    # replace default with https://gist.github.com/dikaio/601ec9b09b5a282db8b78ab89f1ad92b
    2. vim /etc/nginx/sites-available/default

    # change cgi.fix_pathinfo=1 with 0=
    3. vim /etc/php/7.0/fpm/php.ini

    # Open and change the line, listen = 127.0.0.1:9000, and change the 127.0.0.1:9000 to listen = /run/php/php7.0-fpm.sock
    4. vim /etc/php/7.0/fpm/pool.d/www.conf

    5. sudo service php7.0-fpm restart && sudo service nginx restart

    6. curl -sS https://getcomposer.org/installer | php

    7. mv composer.phar /usr/local/bin/composer

    8. composer create-project laravel/laravel /var/www/laravel/ 4.2

    9. chgrp -R www-data /var/www/laravel && chmod -R 775 /var/www/laravel/app/storage
  4. @dikaio dikaio created this gist Mar 20, 2017.
    16 changes: 16 additions & 0 deletions server.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    server {
    listen 80 default_server;
    root /var/www/laravel/public;
    index index.php index.html index.htm;
    server_name _;
    location / {
    try_files $uri $uri/ /index.php$is_args$args;
    }
    location ~ \.php$ {
    try_files $uri /index.php = 404;
    fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
    }
    }