{"id":28936,"date":"2023-05-24T09:57:25","date_gmt":"2023-10-16T22:48:16","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8ubuntu%e4%b8%8a%e4%bd%bf%e7%94%a8nginx%e6%9d%a5%e5%b1%95%e7%a4%bahello-world%e3%80%82-49\/"},"modified":"2025-08-12T10:52:36","modified_gmt":"2025-08-12T02:52:36","slug":"%e5%9c%a8ubuntu%e4%b8%8a%e4%bd%bf%e7%94%a8nginx%e6%9d%a5%e5%b1%95%e7%a4%bahello-world%e3%80%82-49","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8ubuntu%e4%b8%8a%e4%bd%bf%e7%94%a8nginx%e6%9d%a5%e5%b1%95%e7%a4%bahello-world%e3%80%82-49\/","title":{"rendered":"\u5728Ubuntu\u4e0a\u4f7f\u7528Nginx\u6765\u5c55\u793aHello World"},"content":{"rendered":"<h1>nginx\uff08Engine X\uff09\u662f\u4ec0\u4e48\uff1f<\/h1>\n<ul class=\"post-ul\">Web\u30b5\u30fc\u30d0\u306e\u4e00\u3064<\/ul>\n<h1>\u5b89\u88c5nginx<\/h1>\n<ul class=\"post-ul\">ubuntu\u304b\u3089\u4e0b\u8a18\u30b3\u30de\u30f3\u30c9\u5b9f\u884c<\/ul>\n<pre class=\"post-pre\"><code>sudo apt update\r\nsudo apt install nginx\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\u78ba\u8a8d<\/ul>\n<pre class=\"post-pre\"><code>nginx -v\r\n<\/code><\/pre>\n<h1>\u542f\u52a8nginx<\/h1>\n<ul class=\"post-ul\">ubuntu\u304b\u3089\u4e0b\u8a18\u30b3\u30de\u30f3\u30c9\u5b9f\u884c<\/ul>\n<pre class=\"post-pre\"><code>sudo nginx\r\n<\/code><\/pre>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657c18c0d0c9c81e0f5abc10\/10-0.png\" alt=\"image.png\" \/><\/div>\n<h1>\u5173\u4e8enginx\u7684\u73af\u5883<\/h1>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30c7\u30d5\u30a9\u30eb\u30c8\u306eroot\u30d5\u30a9\u30eb\u30c0\u306f\/var\/www\/html<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\/var\/www\/html \u306b\u79fb\u52d5<\/ul>\n<pre class=\"post-pre\"><code>cd \/var\/www\/html\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\u30d5\u30a1\u30a4\u30eb\u3092\u8868\u793a\u3057\u3066\u307f\u308b<\/ul>\n<pre class=\"post-pre\"><code>user01@DESKTOP-5FA6FSN:\/var\/www\/html$ ls\r\nindex.nginx-debian.html\r\n<\/code><\/pre>\n<p>http:\/\/localhost \u3067\u8868\u793a\u3055\u308c\u3066\u3044\u305f\u300cWelcome \uff5e\u300d\u306f\u3001<br \/>\nindex.nginx-debian.html \u304c\u8868\u793a\u3055\u308c\u3066\u3044\u305f<\/p>\n<h1>\u4f60\u597d\u4e16\u754c (n\u01d0 sh\u00ec ji\u00e8)<\/h1>\n<ul class=\"post-ul\">\/var\/www\/html\/hello.html \u3092\u4f5c\u6210<\/ul>\n<pre class=\"post-pre\"><code>sudo vi hello.html\r\n<\/code><\/pre>\n<ul class=\"post-ul\">hello.html\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3057\u4fdd\u5b58<\/ul>\n<pre class=\"post-pre\"><code>hello world\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u4e0b\u8a18\u306b\u30a2\u30af\u30bb\u30b9<\/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\">http:\/\/localhost\/hello.html<\/ul>\n<\/li>\n<\/ul>\n<p>\u300chello world\u300d\u3068\u8868\u793a\u3055\u308c\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3059\u308b<\/p>\n<h1>\u8ba9\u6211\u4eec\u770b\u4e00\u4e0bnginx\u7684\u914d\u7f6e\u6587\u4ef6<\/h1>\n<pre class=\"post-pre\"><code>cd \/etc\/nginx\r\nview nginx.conf\r\n<\/code><\/pre>\n<p>Linux\u7684\u914d\u7f6e\u6587\u4ef6\u901a\u5e38\u5b58\u653e\u5728\/etc\u76ee\u5f55\u4e0b\u3002<\/p>\n<h2>\u4e3a\u4ec0\u4e48\u8981\u5f15\u7528\u4f4d\u4e8e\/var\/www\/html\u7684\u6587\u4ef6\uff1f<\/h2>\n<ul class=\"post-ul\">view\u30b3\u30de\u30f3\u30c9\u3067\u53c2\u7167\u3059\u308b\u3068\u4e0b\u8a18\u306e\u3088\u3046\u306a\u8a2d\u5b9a\u304c\u3042\u308b<\/ul>\n<pre class=\"post-pre\"><code>include \/etc\/nginx\/conf.d\/*.conf;\r\ninclude \/etc\/nginx\/sites-enabled\/*;\r\n<\/code><\/pre>\n<p>\u5305\u62ec\u5728\u5185\uff0c\u5e76\u4e14\u8fd8\u52a0\u8f7d\u4e86\u5176\u4ed6\u6587\u4ef6\u3002<\/p>\n<ul class=\"post-ul\">include\u3055\u308c\u3066\u3044\u308b\/etc\/nginx\/sites-enabled\/default\u3092\u53c2\u7167\u3057\u3066\u307f\u308b<\/ul>\n<pre class=\"post-pre\"><code>view sites-enabled\/default\r\n<\/code><\/pre>\n<ul class=\"post-ul\">default\u306b<\/ul>\n<pre class=\"post-pre\"><code>root \/var\/www\/html;\r\n<\/code><\/pre>\n<p>\u5728\u8fd9\u91cc\u8bbe\u7f6e\u7684\u76ee\u5f55\u4e2d\u6709\u4e00\u4e2a\u5b9a\u4e49\uff0c\u53ef\u4ee5\u5f15\u7528\u8be5\u76ee\u5f55\u4e2d\u7684\u6587\u4ef6\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>nginx\uff08Engine X\uff09\u662f\u4ec0\u4e48\uff1f Web\u30b5\u30fc\u30d0\u306e\u4e00\u3064 \u5b89\u88c5nginx ubuntu\u304b\u3089\u4e0b\u8a18\u30b3\u30de\u30f3\u30c9\u5b9f\u884c  [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[227],"class_list":["post-28936","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-227"],"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>\u5728Ubuntu\u4e0a\u4f7f\u7528Nginx\u6765\u5c55\u793aHello World - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"\u5173\u4e8e\u5728Ubuntu\u4e0a\u4f7f\u7528Nginx\u6765\u5c55\u793aHello World\u7684\u6280\u672f\u6587\u7ae0\" \/>\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\/\u5728ubuntu\u4e0a\u4f7f\u7528nginx\u6765\u5c55\u793ahello-world\u3002-49\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5728Ubuntu\u4e0a\u4f7f\u7528Nginx\u6765\u5c55\u793aHello World\" \/>\n<meta property=\"og:description\" content=\"\u5173\u4e8e\u5728Ubuntu\u4e0a\u4f7f\u7528Nginx\u6765\u5c55\u793aHello World\u7684\u6280\u672f\u6587\u7ae0\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5728ubuntu\u4e0a\u4f7f\u7528nginx\u6765\u5c55\u793ahello-world\u3002-49\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-10-16T22:48:16+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-12T02:52:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657c18c0d0c9c81e0f5abc10\/10-0.png\" \/>\n<meta name=\"author\" content=\"\u6e05, \u5b87\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u6e05, \u5b87\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8ubuntu%e4%b8%8a%e4%bd%bf%e7%94%a8nginx%e6%9d%a5%e5%b1%95%e7%a4%bahello-world%e3%80%82-49\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8ubuntu%e4%b8%8a%e4%bd%bf%e7%94%a8nginx%e6%9d%a5%e5%b1%95%e7%a4%bahello-world%e3%80%82-49\/\",\"name\":\"\u5728Ubuntu\u4e0a\u4f7f\u7528Nginx\u6765\u5c55\u793aHello World - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-10-16T22:48:16+00:00\",\"dateModified\":\"2025-08-12T02:52:36+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e\"},\"description\":\"\u5173\u4e8e\u5728Ubuntu\u4e0a\u4f7f\u7528Nginx\u6765\u5c55\u793aHello World\u7684\u6280\u672f\u6587\u7ae0\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8ubuntu%e4%b8%8a%e4%bd%bf%e7%94%a8nginx%e6%9d%a5%e5%b1%95%e7%a4%bahello-world%e3%80%82-49\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8ubuntu%e4%b8%8a%e4%bd%bf%e7%94%a8nginx%e6%9d%a5%e5%b1%95%e7%a4%bahello-world%e3%80%82-49\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8ubuntu%e4%b8%8a%e4%bd%bf%e7%94%a8nginx%e6%9d%a5%e5%b1%95%e7%a4%bahello-world%e3%80%82-49\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5728Ubuntu\u4e0a\u4f7f\u7528Nginx\u6765\u5c55\u793aHello World\"}]},{\"@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\/1a6ecd3d914d22a5ac32791ffc1fbd8e\",\"name\":\"\u6e05, \u5b87\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g\",\"caption\":\"\u6e05, \u5b87\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyu\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8ubuntu%e4%b8%8a%e4%bd%bf%e7%94%a8nginx%e6%9d%a5%e5%b1%95%e7%a4%bahello-world%e3%80%82-49\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u5728Ubuntu\u4e0a\u4f7f\u7528Nginx\u6765\u5c55\u793aHello World - Blog - Silicon Cloud","description":"\u5173\u4e8e\u5728Ubuntu\u4e0a\u4f7f\u7528Nginx\u6765\u5c55\u793aHello World\u7684\u6280\u672f\u6587\u7ae0","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\/\u5728ubuntu\u4e0a\u4f7f\u7528nginx\u6765\u5c55\u793ahello-world\u3002-49\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5728Ubuntu\u4e0a\u4f7f\u7528Nginx\u6765\u5c55\u793aHello World","og_description":"\u5173\u4e8e\u5728Ubuntu\u4e0a\u4f7f\u7528Nginx\u6765\u5c55\u793aHello World\u7684\u6280\u672f\u6587\u7ae0","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u5728ubuntu\u4e0a\u4f7f\u7528nginx\u6765\u5c55\u793ahello-world\u3002-49\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-10-16T22:48:16+00:00","article_modified_time":"2025-08-12T02:52:36+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657c18c0d0c9c81e0f5abc10\/10-0.png"}],"author":"\u6e05, \u5b87","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u6e05, \u5b87","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8ubuntu%e4%b8%8a%e4%bd%bf%e7%94%a8nginx%e6%9d%a5%e5%b1%95%e7%a4%bahello-world%e3%80%82-49\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8ubuntu%e4%b8%8a%e4%bd%bf%e7%94%a8nginx%e6%9d%a5%e5%b1%95%e7%a4%bahello-world%e3%80%82-49\/","name":"\u5728Ubuntu\u4e0a\u4f7f\u7528Nginx\u6765\u5c55\u793aHello World - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-10-16T22:48:16+00:00","dateModified":"2025-08-12T02:52:36+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e"},"description":"\u5173\u4e8e\u5728Ubuntu\u4e0a\u4f7f\u7528Nginx\u6765\u5c55\u793aHello World\u7684\u6280\u672f\u6587\u7ae0","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8ubuntu%e4%b8%8a%e4%bd%bf%e7%94%a8nginx%e6%9d%a5%e5%b1%95%e7%a4%bahello-world%e3%80%82-49\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8ubuntu%e4%b8%8a%e4%bd%bf%e7%94%a8nginx%e6%9d%a5%e5%b1%95%e7%a4%bahello-world%e3%80%82-49\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8ubuntu%e4%b8%8a%e4%bd%bf%e7%94%a8nginx%e6%9d%a5%e5%b1%95%e7%a4%bahello-world%e3%80%82-49\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u5728Ubuntu\u4e0a\u4f7f\u7528Nginx\u6765\u5c55\u793aHello World"}]},{"@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\/1a6ecd3d914d22a5ac32791ffc1fbd8e","name":"\u6e05, \u5b87","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g","caption":"\u6e05, \u5b87"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyu\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8ubuntu%e4%b8%8a%e4%bd%bf%e7%94%a8nginx%e6%9d%a5%e5%b1%95%e7%a4%bahello-world%e3%80%82-49\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/28936","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\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=28936"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/28936\/revisions"}],"predecessor-version":[{"id":90059,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/28936\/revisions\/90059"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=28936"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=28936"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=28936"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}