{"id":36982,"date":"2023-08-29T17:51:46","date_gmt":"2023-02-13T20:17:42","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/laravel%e8%ae%be%e7%bd%ae%e6%9d%83%e9%99%90%e7%9a%84%e7%ac%94%e8%ae%b0\/"},"modified":"2024-04-30T20:37:39","modified_gmt":"2024-04-30T12:37:39","slug":"laravel%e8%ae%be%e7%bd%ae%e6%9d%83%e9%99%90%e7%9a%84%e7%ac%94%e8%ae%b0","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/laravel%e8%ae%be%e7%bd%ae%e6%9d%83%e9%99%90%e7%9a%84%e7%ac%94%e8%ae%b0\/","title":{"rendered":"Laravel\u8bbe\u7f6e\u6743\u9650\u7684\u7b14\u8bb0"},"content":{"rendered":"<p>\u4e2a\u4eba\u5907\u5fd8\u5f55\u3002<\/p>\n<h1>\u73af\u5883<\/h1>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u3055\u304f\u3089VPS\u30b5\u30fc\u30d0\u30fc CentOS7<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Laravel 10.4.1<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">Apatch<\/ul>\n<h1>\u8bbe\u5b9a\u65b9\u5f0f<\/h1>\n<ul class=\"post-ul\">Laravel\u306e\u30eb\u30fc\u30c8\u306b\u79fb\u52d5<\/ul>\n<pre class=\"post-pre\"><code><span class=\"nb\">cd<\/span> \/path\/to\/laravel_application\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">webserver\u30e6\u30fc\u30b6\u30fc\u306b\u3059\u3079\u3066\u306e\u30d5\u30a1\u30a4\u30eb\u3068\u30d5\u30a9\u30eb\u30c0\u30fc\u306e\u6240\u6709\u6a29\u3092\u4ed8\u4e0e\u3059\u308b\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u203bwebserver\u30e6\u30fc\u30b6\u30fc\u3068\u306f\u3001Web\u30b5\u30fc\u30d0\u30fc\uff08Apache\u3001nginx\u306a\u3069\uff09\u304c\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u901a\u5e38\u306e\u64cd\u4f5c\u306b\u4f7f\u7528\u3059\u308b\u30e6\u30fc\u30b6\u30fc\u306e\u3053\u3068\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Ubuntu\u3000\u3067\u306fwww-data\u3000\u30e6\u30fc\u30b6\u30fc<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">centos\u3067\u306f\u3000apache\u3000\u30e6\u30fc\u30b6\u30fc<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">debian\u3000www-data\u3000\u30e6\u30fc\u30b6\u30fc<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\u2192\u4eca\u56de\u306fcentos\u306a\u306e\u3067apache\u3000\u30e6\u30fc\u30b6\u30fc\u3092\u4f7f\u7528\u3002<\/ul>\n<pre class=\"post-pre\"><code><span class=\"nb\">chown<\/span> <span class=\"nt\">-R<\/span> apache:apache \/var\/www\/laravel_application\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\u3059\u3079\u3066\u306e\u30d5\u30a1\u30a4\u30eb\u306b 644 \u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u3092\u8a2d\u5b9a\u3001\u3059\u3079\u3066\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b 755 \u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u3092\u8a2d\u5b9a\u3002<\/ul>\n<pre class=\"post-pre\"><code><span class=\"nb\">sudo <\/span>find \/var\/www\/laravel_application <span class=\"nt\">-type<\/span> f <span class=\"nt\">-exec<\/span> <span class=\"nb\">chmod <\/span>644 <span class=\"o\">{}<\/span> <span class=\"se\">\\;<\/span> \r\n<span class=\"nb\">sudo <\/span>find \/var\/www\/laravel_application <span class=\"nt\">-type<\/span> d <span class=\"nt\">-exec<\/span> <span class=\"nb\">chmod <\/span>755 <span class=\"o\">{}<\/span> <span class=\"se\">\\;<\/span> \r\n<\/code><\/pre>\n<ul class=\"post-ul\">storage\u3068bootstrap\/cache\u306e\u30d5\u30a1\u30a4\u30eb\u3068\u30d5\u30a9\u30eb\u30c0\u30fc\u306b\u9069\u5207\u306a\u8aad\u307f\u53d6\u308a\u3068\u66f8\u304d\u8fbc\u307f\u306e\u30a2\u30af\u30bb\u30b9\u8a31\u53ef\u3092\u4e0e\u3048\u308b\u3002<\/ul>\n<pre class=\"post-pre\"><code><span class=\"nb\">sudo chgrp<\/span> <span class=\"nt\">-R<\/span> apache storage bootstrap\/cache\r\n<span class=\"nb\">sudo chmod<\/span> <span class=\"nt\">-R<\/span> ug+rwx storage bootstrap\/cache \r\n<\/code><\/pre>\n<ul class=\"post-ul\">\u30e6\u30fc\u30b6\u30fc\u3092apache\u30b0\u30eb\u30fc\u30d7\u306b\u8ffd\u52a0<\/ul>\n<pre class=\"post-pre\"><code>usermod <span class=\"nt\">-a<\/span> <span class=\"nt\">-G<\/span> apache &lt;\u30e6\u30fc\u30b6\u30fc\u540d&gt;\r\n<\/code><\/pre>\n<p>\u5c06\u7528\u6237\u6dfb\u52a0\u5230\u7ec4\u7684\u547d\u4ee4\uff1a<br \/>\nusermod -a -G \u7ec4\u540d \u7528\u6237\u540d<br \/>\n\u2192\u610f\u56fe\u662f\u5c06\u7528\u4e8e\u5f00\u53d1\u7684\u7528\u6237\u6dfb\u52a0\u5230apache\u7ec4\uff0c\u5e76\u4f7f\u5176\u80fd\u591f\u8fdb\u884c\u4e0eapache\u7ec4\u76f8\u540c\u7684\u64cd\u4f5c\uff1f<\/p>\n<h1>\u8bf7\u770b\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/h1>\n<p>\u53c2\u8003\u6587\u732e<br \/>\n\u53c2\u8003\u8d44\u6599<br \/>\n\u53c2\u7167<br \/>\n\u53c2\u8003\u4e66\u76ee<br \/>\n\u53c2\u8003\u94fe\u63a5<br \/>\n\u53c2\u8003\u6765\u6e90<\/p>\n<p>\u5728\u4f7f\u7528CentOS\/Apache\/Laravel\u65f6\uff0c\u5982\u4f55\u6b63\u786e\u8bbe\u7f6e\u6587\u4ef6\u6743\u9650\uff1f<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e2a\u4eba\u5907\u5fd8\u5f55\u3002 \u73af\u5883 \u3055\u304f\u3089VPS\u30b5\u30fc\u30d0\u30fc CentOS7 &nbsp; Laravel 10.4.1 &#038;nbs [&hellip;]<\/p>\n","protected":false},"author":12,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-36982","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Laravel\u8bbe\u7f6e\u6743\u9650\u7684\u7b14\u8bb0 - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/laravel\u8bbe\u7f6e\u6743\u9650\u7684\u7b14\u8bb0\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Laravel\u8bbe\u7f6e\u6743\u9650\u7684\u7b14\u8bb0\" \/>\n<meta property=\"og:description\" content=\"\u4e2a\u4eba\u5907\u5fd8\u5f55\u3002 \u73af\u5883 \u3055\u304f\u3089VPS\u30b5\u30fc\u30d0\u30fc CentOS7 &nbsp; Laravel 10.4.1 &amp;nbs [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/laravel\u8bbe\u7f6e\u6743\u9650\u7684\u7b14\u8bb0\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-02-13T20:17:42+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-30T12:37:39+00:00\" \/>\n<meta name=\"author\" content=\"\u9038, \u79d1\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u9038, \u79d1\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/laravel%e8%ae%be%e7%bd%ae%e6%9d%83%e9%99%90%e7%9a%84%e7%ac%94%e8%ae%b0\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/laravel%e8%ae%be%e7%bd%ae%e6%9d%83%e9%99%90%e7%9a%84%e7%ac%94%e8%ae%b0\/\",\"name\":\"Laravel\u8bbe\u7f6e\u6743\u9650\u7684\u7b14\u8bb0 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-02-13T20:17:42+00:00\",\"dateModified\":\"2024-04-30T12:37:39+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/85c1dae56e6ea1e695c73d33c684d487\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/laravel%e8%ae%be%e7%bd%ae%e6%9d%83%e9%99%90%e7%9a%84%e7%ac%94%e8%ae%b0\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/laravel%e8%ae%be%e7%bd%ae%e6%9d%83%e9%99%90%e7%9a%84%e7%ac%94%e8%ae%b0\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/laravel%e8%ae%be%e7%bd%ae%e6%9d%83%e9%99%90%e7%9a%84%e7%ac%94%e8%ae%b0\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Laravel\u8bbe\u7f6e\u6743\u9650\u7684\u7b14\u8bb0\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/85c1dae56e6ea1e695c73d33c684d487\",\"name\":\"\u9038, \u79d1\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c94f6d9cbbfbca863fab309840bd690c153c95f8490c290ad2ed54dd693dad16?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c94f6d9cbbfbca863fab309840bd690c153c95f8490c290ad2ed54dd693dad16?s=96&d=mm&r=g\",\"caption\":\"\u9038, \u79d1\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/keyi\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/laravel%e8%ae%be%e7%bd%ae%e6%9d%83%e9%99%90%e7%9a%84%e7%ac%94%e8%ae%b0\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Laravel\u8bbe\u7f6e\u6743\u9650\u7684\u7b14\u8bb0 - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/laravel\u8bbe\u7f6e\u6743\u9650\u7684\u7b14\u8bb0\/","og_locale":"zh_CN","og_type":"article","og_title":"Laravel\u8bbe\u7f6e\u6743\u9650\u7684\u7b14\u8bb0","og_description":"\u4e2a\u4eba\u5907\u5fd8\u5f55\u3002 \u73af\u5883 \u3055\u304f\u3089VPS\u30b5\u30fc\u30d0\u30fc CentOS7 &nbsp; Laravel 10.4.1 &nbs [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/laravel\u8bbe\u7f6e\u6743\u9650\u7684\u7b14\u8bb0\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-02-13T20:17:42+00:00","article_modified_time":"2024-04-30T12:37:39+00:00","author":"\u9038, \u79d1","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u9038, \u79d1"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/laravel%e8%ae%be%e7%bd%ae%e6%9d%83%e9%99%90%e7%9a%84%e7%ac%94%e8%ae%b0\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/laravel%e8%ae%be%e7%bd%ae%e6%9d%83%e9%99%90%e7%9a%84%e7%ac%94%e8%ae%b0\/","name":"Laravel\u8bbe\u7f6e\u6743\u9650\u7684\u7b14\u8bb0 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-02-13T20:17:42+00:00","dateModified":"2024-04-30T12:37:39+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/85c1dae56e6ea1e695c73d33c684d487"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/laravel%e8%ae%be%e7%bd%ae%e6%9d%83%e9%99%90%e7%9a%84%e7%ac%94%e8%ae%b0\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/laravel%e8%ae%be%e7%bd%ae%e6%9d%83%e9%99%90%e7%9a%84%e7%ac%94%e8%ae%b0\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/laravel%e8%ae%be%e7%bd%ae%e6%9d%83%e9%99%90%e7%9a%84%e7%ac%94%e8%ae%b0\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"Laravel\u8bbe\u7f6e\u6743\u9650\u7684\u7b14\u8bb0"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/85c1dae56e6ea1e695c73d33c684d487","name":"\u9038, \u79d1","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c94f6d9cbbfbca863fab309840bd690c153c95f8490c290ad2ed54dd693dad16?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c94f6d9cbbfbca863fab309840bd690c153c95f8490c290ad2ed54dd693dad16?s=96&d=mm&r=g","caption":"\u9038, \u79d1"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/keyi\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/laravel%e8%ae%be%e7%bd%ae%e6%9d%83%e9%99%90%e7%9a%84%e7%ac%94%e8%ae%b0\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/36982","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=36982"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/36982\/revisions"}],"predecessor-version":[{"id":94166,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/36982\/revisions\/94166"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=36982"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=36982"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=36982"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}