{"id":9512,"date":"2024-11-21T19:14:02","date_gmt":"2024-11-22T03:14:02","guid":{"rendered":"https:\/\/www.shop2world.com\/blog\/?p=9512"},"modified":"2024-12-06T19:10:36","modified_gmt":"2024-12-07T03:10:36","slug":"sws-php-7-3-25-%ec%84%9c%eb%b2%84%ec%97%90-laravel-8-%ec%84%a4%ec%b9%98-%ea%b0%80%ec%9d%b4%eb%93%9c-2","status":"publish","type":"post","link":"https:\/\/www.shop2world.com\/blog\/archives\/9512","title":{"rendered":"[ SWS ] PHP 7.3.25 \uc11c\ubc84\uc5d0 Laravel 8 \uc124\uce58 \uac00\uc774\ub4dc 2"},"content":{"rendered":"\n<h1>Laravel&nbsp;8 \uc124\uce58 \uac00\uc774\ub4dc&nbsp;(PHP 7.3.25)<\/h1>\n\n\n\n<p>\uc18c\uc694 \uc2dc\uac04 \u23f1\ufe0f : 10\ubd84<br>*chroot \ud658\uacbd\uc758 \uc0f5\ud22c\uc6d4\ub4dc \uc6f9\uc11c\ube44\uc2a4 \uc774\uc6a9 \uace0\uac1d\uc740 \uc544\ub798\uc758 \ud130\ubbf8\ub0a0 \uae30\ubc18 \uc791\uc5c5\uc740 \ubcc4\ub3c4 \uad00\ub9ac\uc790 \uc694\uccad \ud544\uc694\ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<p>\uae30\ubcf8 \uc9c0\uc2dd \ud83d\udcda : <a href=\"https:\/\/www.shop2world.com\/blog\/archives\/9505\" data-type=\"URL\">Plesk \uc811\uc18d \ubc29\ubc95<\/a>, \uac04\ub2e8\ud55c <a href=\"https:\/\/www.shop2world.com\/blog\/archives\/9542\" data-type=\"URL\" data-id=\"https:\/\/www.shop2world.com\/blog\/archives\/9542\">Nano \uc5d0\ub514\ud130 \uc0ac\uc6a9\ubc95<\/a>. (Plesk\uc758 File Manger\ub3c4 \uac00\ub2a5), <a href=\"https:\/\/www.shop2world.com\/blog\/archives\/9551\" data-type=\"URL\" data-id=\"https:\/\/www.shop2world.com\/blog\/archives\/9551\">SSH \uc811\uc18d \ubc29\ubc95(Putty)<\/a><\/p>\n\n\n\n<h2>1. \uc0ac\uc804 \uc900\ube44 \ud83d\udee0\ufe0f<\/h2>\n\n\n\n<h4><strong>1.1 \uc11c\ube0c\ub3c4\uba54\uc778 \uc0dd\uc131 \ud83c\udf10<\/strong>(\uc11c\ube0c\ub3c4\uba54\uc778\uc5d0 \uc124\uce58\ud558\ub294 \uacbd\uc6b0)<\/h4>\n\n\n\n<ul><li><strong>Plesk<\/strong>\uc5d0\uc11c \uc11c\ube0c\ub3c4\uba54\uc778 \uc0dd\uc131 (\uc608: <code>laravel.shop2world.info<\/code>)<\/li><li><strong>Document Root<\/strong>\ub294 \ub098\uc911\uc5d0 \uc124\uc815<\/li><\/ul>\n\n\n\n<h4><strong>1.2 PHP \uc124\uc815 \u2699\ufe0f<\/strong><\/h4>\n\n\n\n<ul><li><strong>Plesk &gt; PHP Settings<\/strong><ul><li>PHP \ubc84\uc804: <strong>7.3.25<\/strong><\/li><li>Handler: <strong>FastCGI application served by Apache<\/strong><\/li><\/ul><\/li><\/ul>\n\n\n\n<h4><strong>1.3 SSH \uc811\uc18d \ud83d\udcbb<\/strong><\/h4>\n\n\n\n<ul><li><strong>Putty<\/strong>\uc640 \uac19\uc740 SSH \ud074\ub77c\uc774\uc5b8\ud2b8\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc11c\ubc84\uc5d0 \uc811\uc18d<\/li><\/ul>\n\n\n\n<h3><strong>2. Laravel \uc124\uce58 \ud83d\ude80<\/strong><\/h3>\n\n\n\n<h4><strong>2.1 \uc784\uc2dc \ub514\ub809\ud1a0\ub9ac \uc0dd\uc131 \ud83d\udcc2<\/strong><\/h4>\n\n\n\n<blockquote class=\"wp-block-quote\"><p><strong>\uc784\uc2dc \ub514\ub809\ud1a0\ub9ac \uc0ac\uc6a9 \uc774\uc720<\/strong>: Composer\uc758 <code>create-project<\/code> \uba85\ub839\uc5b4\ub294 \uc124\uce58 \ub300\uc0c1 \ub514\ub809\ud1a0\ub9ac\uac00 \uc644\uc804\ud788 \ube44\uc5b4\uc788\uc5b4\uc57c \ud569\ub2c8\ub2e4.<\/p><\/blockquote>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/var\/www\/vhosts\/shop2world.info\nrm -rf fresh_laravel\nmkdir fresh_laravel\ncd fresh_laravel<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>2.2&nbsp;Composer \ubc0f Laravel \uc124\uce58<\/strong>\ud83d\uded2<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/opt\/plesk\/php\/7.3\/bin\/php -r \"copy('https:\/\/getcomposer.org\/installer', 'composer-setup.php');\"\n\/opt\/plesk\/php\/7.3\/bin\/php composer-setup.php\n\/opt\/plesk\/php\/7.3\/bin\/php composer.phar create-project --prefer-dist laravel\/laravel:^8.0 laravel_project<\/code><\/pre>\n\n\n\n<p><strong>2.3 \ud30c\uc77c \uc774\ub3d9<\/strong>\ud83d\udce6<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mv laravel_project\/* ..\/laravel.shop2world.info\/\nmv laravel_project\/.* ..\/laravel.shop2world.info\/ 2&gt;\/dev\/null\ncd ..\/laravel.shop2world.info<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h3><strong>3. \ud658\uacbd \uc124\uc815 \u2699\ufe0f<\/strong><\/h3>\n\n\n\n<h4><strong>3.1 .env \ud30c\uc77c \uc124\uc815 \ud83d\udcdd<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code># .env \ud30c\uc77c \ubcf5\uc0ac\ncp .env.example .env\n\n# \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \ud0a4 \uc0dd\uc131\n\/opt\/plesk\/php\/7.3\/bin\/php artisan key:generate\n\n# .env \ud30c\uc77c \uc218\uc815 .nano \ub610\ub294 plesk File Manager \uc0ac\uc6a9 \uac00\ub2a5\nnano .env<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># \ud544\uc218 \uc124\uc815\nAPP_NAME=Laravel\nAPP_ENV=production        # \uc911\uc694: production\uc73c\ub85c \uc124\uc815\nAPP_DEBUG=false          # \uc911\uc694: \ubcf4\uc548\uc744 \uc704\ud574 false\ub85c \uc124\uc815\nAPP_URL=https:\/\/laravel.shop2world.info\nAPP_KEY=&#91;\uc790\ub3d9\uc0dd\uc131\ub428]     # key:generate\ub85c \uc790\ub3d9 \uc0dd\uc131\ub428\n\n# \ub370\uc774\ud130\ubca0\uc774\uc2a4 \uc124\uc815\nDB_CONNECTION=mysql\nDB_HOST=localhost\nDB_PORT=3306\nDB_DATABASE=your_DB_DATABASE\nDB_USERNAME=your_DB_USERNAME\nDB_PASSWORD=your_password\n\n# \ucd94\uac00 \uc124\uc815\nLOG_CHANNEL=stack\nLOG_LEVEL=error          # production \ud658\uacbd\uc5d0\uc11c\ub294 error\ub85c \uc124\uc815\n\n# \uc138\uc158 \ubc0f \uce90\uc2dc \uc124\uc815\nBROADCAST_DRIVER=log\nCACHE_DRIVER=file\nFILESYSTEM_DRIVER=local\nQUEUE_CONNECTION=sync\nSESSION_DRIVER=file\nSESSION_LIFETIME=120<\/code><\/pre>\n\n\n\n<p>3.2 AppServiceProvider \uc218\uc815 \ud83d\udee0\ufe0f<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nano app\/Providers\/AppServiceProvider.php<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\nnamespace App\\Providers;\nuse Illuminate\\Support\\ServiceProvider;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass AppServiceProvider extends ServiceProvider\n{\n    public function boot()\n    {\n        Schema::defaultStringLength(191);\n    }\n}<\/code><\/pre>\n\n\n\n<p>3.3 .htaccess \uc124\uc815 \ud83d\udd12<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nano public\/.htaccess<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;IfModule mod_rewrite.c&gt;\n    &lt;IfModule mod_negotiation.c&gt;\n        Options -MultiViews -Indexes\n    &lt;\/IfModule&gt;\n\n    RewriteEngine On\n\n    # Handle Authorization Header\n    RewriteCond %{HTTP:Authorization} .\n    RewriteRule .* - &#91;E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]\n\n    # Redirect Trailing Slashes...\n    RewriteCond %{REQUEST_FILENAME} !-d\n    RewriteCond %{REQUEST_URI} (.+)\/$\n    RewriteRule ^ %1 &#91;L,R=301]\n\n    # Send Requests To Front Controller...\n    RewriteCond %{REQUEST_FILENAME} !-d\n    RewriteCond %{REQUEST_FILENAME} !-f\n    RewriteRule ^ index.php &#91;L]\n&lt;\/IfModule&gt;<\/code><\/pre>\n\n\n\n<h3><strong>4. \ucd5c\uc885 \uc124\uc815 \ud83d\udd27<\/strong><\/h3>\n\n\n\n<h4><strong>4.1 \uad8c\ud55c \uc124\uc815 \ud83d\udee1\ufe0f<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code># 1. .env \ud30c\uc77c \ubcf4\uc548 \uc124\uc815\ub9cc \uc801\uc6a9\nchmod 600 .env\n\n# 2. \uad8c\ud55c \ud655\uc778 (\ud544\uc694\uc2dc)\nls -la storage\/\nls -la bootstrap\/cache\/<\/code><\/pre>\n\n\n\n<h4><strong>4.2 Document Root \uc124\uc815 \ud83c\udf10<\/strong><\/h4>\n\n\n\n<ul><li><strong>Plesk &gt; Hosting Settings<\/strong><ul><li>Document Root: <code>\/public<\/code><\/li><\/ul><\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>laravel.shop2world.info\/public<\/code><\/pre>\n\n\n\n<p>4.3 \uce90\uc2dc \ud074\ub9ac\uc5b4 \ubc0f \ub9c8\uc774\uadf8\ub808\uc774\uc158 \ud83e\uddf9<br><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/opt\/plesk\/php\/7.3\/bin\/php artisan config:clear\n\/opt\/plesk\/php\/7.3\/bin\/php artisan cache:clear\n\/opt\/plesk\/php\/7.3\/bin\/php artisan view:clear\n\/opt\/plesk\/php\/7.3\/bin\/php artisan route:clear\n\/opt\/plesk\/php\/7.3\/bin\/php artisan migrate --force<\/code><\/pre>\n\n\n\n<p>4.4 \uc784\uc2dc \ub514\ub809\ud1a0\ub9ac \uc815\ub9ac \ud83d\uddd1\ufe0f<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd ..\nrm -rf fresh_laravel<\/code><\/pre>\n\n\n\n<h3><strong>5. \uc124\uce58 \ud655\uc778 \u2705<\/strong><\/h3>\n\n\n\n<h4><strong>5.1 \ube0c\ub77c\uc6b0\uc800 \ud655\uc778 \ud83c\udf10<\/strong><\/h4>\n\n\n\n<ul><li><a href=\"https:\/\/laravel.shop2world.info\">https:\/\/laravel.shop2world.info<\/a> \uc811\uc18d<ul><li>Laravel \uae30\ubcf8 \ud398\uc774\uc9c0 \ud45c\uc2dc \ud655\uc778<\/li><li>HTTPS \uc815\uc0c1 \uc791\ub3d9 \ud655\uc778<\/li><\/ul><\/li><\/ul>\n\n\n\n<h4><strong>5.2 \uc624\ub958 \ubc1c\uc0dd \uc2dc \ud655\uc778\uc0ac\ud56d \ud83d\udd0d<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>- storage\/logs\/laravel.log \ud655\uc778\n  tail -f storage\/logs\/laravel.log\n- PHP \ubc84\uc804 \ud655\uc778\n  \/opt\/plesk\/php\/7.3\/bin\/php -v\n- \uad8c\ud55c \uc124\uc815 \ud655\uc778\n  ls -la storage\/\n  ls -la bootstrap\/cache\/<\/code><\/pre>\n\n\n\n<p>\ubcf4\uc548 \uad00\ub828 \uc8fc\uc758\uc0ac\ud56d \ud83d\udea8<\/p>\n\n\n\n<p>.env \ud30c\uc77c\uc758&nbsp;\uad8c\ud55c \uc124\uc815 (600)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chmod 600 .env<\/code><\/pre>\n\n\n\n<p>storage&nbsp;\ub514\ub809\ud1a0\ub9ac \uc678\ubd80 \uc811\uadfc&nbsp;\uc81c\ud55c<\/p>\n\n\n\n<p>APP_DEBUG=false \ud655\uc778<\/p>\n\n\n\n<p>\uc911\uc694 \ub514\ub809\ud1a0\ub9ac&nbsp;\uad8c\ud55c \uc124\uc815&nbsp;\ud655\uc778<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Laravel&nbsp;8 \uc124\uce58 \uac00\uc774\ub4dc&nbsp;(PHP 7.3.25) \uc18c\uc694 \uc2dc\uac04 \u23f1\ufe0f : 10\ubd84*chroot \ud658\uacbd\uc758 \uc0f5\ud22c\uc6d4\ub4dc \uc6f9\uc11c\ube44\uc2a4 \uc774\uc6a9 \uace0\uac1d\uc740 \uc544\ub798\uc758 \ud130\ubbf8\ub0a0 \uae30\ubc18 \uc791\uc5c5\uc740 \ubcc4\ub3c4 \uad00\ub9ac\uc790 \uc694\uccad \ud544\uc694\ud569\ub2c8\ub2e4. \uae30\ubcf8 \uc9c0\uc2dd \ud83d\udcda : Plesk \uc811\uc18d \ubc29\ubc95, \uac04\ub2e8\ud55c Nano \uc5d0\ub514\ud130 \uc0ac\uc6a9\ubc95. (Plesk\uc758 File Manger\ub3c4 \uac00\ub2a5), SSH \uc811\uc18d \ubc29\ubc95(Putty) 1. \uc0ac\uc804 \uc900\ube44 \ud83d\udee0\ufe0f 1.1 \uc11c\ube0c\ub3c4\uba54\uc778 \uc0dd\uc131 \ud83c\udf10(\uc11c\ube0c\ub3c4\uba54\uc778\uc5d0 \uc124\uce58\ud558\ub294 \uacbd\uc6b0) Plesk\uc5d0\uc11c \uc11c\ube0c\ub3c4\uba54\uc778 \uc0dd\uc131 (\uc608: laravel.shop2world.info) Document Root\ub294 \ub098\uc911\uc5d0 \uc124\uc815 1.2 PHP \uc124\uc815 \u2699\ufe0f Plesk &gt; PHP Settings PHP \ubc84\uc804: 7.3.25 Handler: FastCGI application served by &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[731],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.shop2world.com\/blog\/wp-json\/wp\/v2\/posts\/9512"}],"collection":[{"href":"https:\/\/www.shop2world.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shop2world.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shop2world.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shop2world.com\/blog\/wp-json\/wp\/v2\/comments?post=9512"}],"version-history":[{"count":41,"href":"https:\/\/www.shop2world.com\/blog\/wp-json\/wp\/v2\/posts\/9512\/revisions"}],"predecessor-version":[{"id":9631,"href":"https:\/\/www.shop2world.com\/blog\/wp-json\/wp\/v2\/posts\/9512\/revisions\/9631"}],"wp:attachment":[{"href":"https:\/\/www.shop2world.com\/blog\/wp-json\/wp\/v2\/media?parent=9512"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shop2world.com\/blog\/wp-json\/wp\/v2\/categories?post=9512"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shop2world.com\/blog\/wp-json\/wp\/v2\/tags?post=9512"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}