Advertisement
Guest User

Untitled

a guest
Nov 7th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.28 KB | None | 0 0
  1. composer create-project laravel/laravel devil
  2. chmod -R 777 devil/storage
  3. chmod -R 777 devil/vendor
  4.  
  5. drwxr-xr-x. 10 adzar adzar 4096 Mar 25 04:06 app
  6. -rwxr-xr-x. 1 adzar adzar 1635 Mar 25 04:06 artisan
  7. drwxr-xr-x. 2 adzar adzar 39 Mar 25 04:06 bootstrap
  8. -rw-r--r--. 1 adzar adzar 788 Mar 25 04:06 composer.json
  9. -rw-r--r--. 1 adzar adzar 100509 Mar 25 04:06 composer.lock
  10. drwxr-xr-x. 2 adzar adzar 4096 Mar 25 04:06 config
  11. drwxr-xr-x. 4 adzar adzar 52 Mar 25 04:06 database
  12. -rw-r--r--. 1 adzar adzar 503 Mar 25 04:06 gulpfile.js
  13. -rw-r--r--. 1 adzar adzar 98 Mar 25 04:06 package.json
  14. -rw-r--r--. 1 adzar adzar 87 Mar 25 04:06 phpspec.yml
  15. -rw-r--r--. 1 adzar adzar 777 Mar 25 04:06 phpunit.xml
  16. drwxr-xr-x. 4 adzar adzar 95 Mar 25 04:06 public
  17. -rw-r--r--. 1 adzar adzar 1724 Mar 25 04:06 readme.md
  18. drwxr-xr-x. 5 adzar adzar 42 Mar 25 04:06 resources
  19. -rw-r--r--. 1 adzar adzar 560 Mar 25 04:06 server.php
  20. drwxrwxrwx. 5 adzar adzar 60 Mar 25 04:06 storage
  21. drwxr-xr-x. 2 adzar adzar 47 Mar 25 04:06 tests
  22. drwxrwxrwx. 26 adzar adzar 4096 Apr 8 18:31 vendor
  23.  
  24. APP_ENV=local
  25. APP_DEBUG=false
  26. APP_KEY=EOvUHTpMtavKDMx1GdkREtbves8PVEUb
  27.  
  28. DB_HOST=localhost
  29. DB_DATABASE=homestead
  30. DB_USERNAME=homestead
  31. DB_PASSWORD=secret
  32.  
  33. CACHE_DRIVER=file
  34. SESSION_DRIVER=file
  35. QUEUE_DRIVER=sync
  36.  
  37. MAIL_DRIVER=smtp
  38. MAIL_HOST=mailtrap.io
  39.  
  40. ...
  41.  
  42. #
  43. # ServerName gives the name and port that the server uses to identify itself.
  44. # This can often be determined automatically, but we recommend you specify
  45. # it explicitly to prevent problems during startup.
  46. #
  47. # If your host doesn't have a registered DNS name, enter its IP address here.
  48. #
  49. ServerName 100.255.XXX.XXX
  50.  
  51. ...
  52.  
  53. <VirtualHost *:80>
  54. ServerName 100.255.XXX.XXX
  55. DocumentRoot /var/www/devil/public
  56.  
  57. <Directory /var/www/devil>
  58. AllowOverride All
  59. </Directory>
  60. </VirtualHost>
  61.  
  62. setenforce 0
  63.  
  64. find storage -type d -exec chmod 777 {} ;
  65. chmod 775 bootstrap/cache
  66.  
  67. sudo vi /etc/sysconfig/selinux
  68.  
  69. # This file is intended to run as root
  70. if [ "$EUID" -ne 0 ]
  71. then echo "Please run as root"
  72. exit
  73. fi
  74.  
  75. # set this to your directory
  76. LARAVELDIR=/var/www/html/cvprima
  77. # just in case the log file does not exist yet
  78. touch $LARAVELDIR/storage/logs/laravel.log
  79. chcon -Rv --type=httpd_log_t $LARAVELDIR/storage/logs/laravel.log
  80. chgrp www $LARAVELDIR/storage/logs $LARAVELDIR/storage/logs/*.log
  81. chmod g+w $LARAVELDIR/storage/logs
  82.  
  83. # now for the ./storage/ directory
  84. STORAGE=$LARAVELDIR/storage
  85. for dir in $STORAGE/framework/cache $STORAGE/framework/sessions $STORAGE/framework/views $STORAGE/app/public $LARAVELDIR/bootstrap/cache ;do
  86. chcon -Rv --type=httpd_sys_rw_content_t $dir 2>/dev/null 1>&2
  87. # you _should_ actually never have .gitignore in these directories...
  88. chcon -Rv --type=httpd_sys_content_t $dir/.gitignore 2>/dev/null 1>&2
  89. chgrp www $dir $dir/* 2>/dev/null 1>&2
  90. chmod -R g+w $dir $dir/* 2>/dev/null 1>&2
  91. done
  92.  
  93. # all your files need to be httpd_sys_content_t (including the ./vendor/* directory tree)
  94. chcon -Rv --type=httpd_sys_content_t $LARAVELDIR
  95.  
  96. # You either need files to be o+r, or chgrp www and g+r so that your webserver can access them.
  97. chgrp -R www $LARAVELDIR
  98. chmod -R g+r $LARAVELDIR
  99. find $LARAVELDIR -type d | xargs chmod -R g+rx
  100.  
  101. chgrp www $LARAVELDIR/.env
  102. chmod 640 $LARAVELDIR/.env
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement