{"id":26922,"date":"2022-08-29T08:00:00","date_gmt":"2022-08-28T23:00:00","guid":{"rendered":"https:\/\/webiker.org\/?p=26922"},"modified":"2022-08-29T08:00:00","modified_gmt":"2022-08-28T23:00:00","slug":"webdav-using-nginx-on-ubuntu22-04lts","status":"publish","type":"post","link":"https:\/\/webiker.org\/yomoyama\/webdav-using-nginx-on-ubuntu22-04lts\/","title":{"rendered":"Ubuntu22.04LTS\u3067nginx\u3092\u4f7f\u3063\u3066WebDav"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u30bf\u30a4\u30c8\u30eb\u306e\u901a\u308a\u3067\u3059\u3002<br>\u672c\u4ef6\u306b\u95a2\u3059\u308b\u60c5\u5831\u306f\u3001\u307e\u3060\u305d\u308c\u307b\u3069\u591a\u304f\u306f\u3042\u308a\u307e\u305b\u3093\u3002<br>\u81ea\u5206\u3078\u306e\u5099\u5fd8\u9332\u3092\u304b\u306d\u3066\u3001\u30a2\u30c3\u30d7\u3057\u3066\u304a\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u8ffd\u52a0\u3057\u3066\u30bd\u30fc\u30b9\u3092DL\u3057\u307e\u3059\u3002<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Ubuntu22.04\u3067\u3001nginx\u3092\u4f7f\u3063\u3066WebDav\u3059\u308b\u65b9\u6cd5\u3067\u3059\u3002<br>apt\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308bnginx\u306b\u306f\u3001WebDAV\u306e\u6a5f\u80fd\u304c\u4e00\u90e8\u542b\u307e\u308c\u3066\u3044\u307e\u305b\u3093\u3002<br>\u3057\u305f\u304c\u3063\u3066\u3001\u30bd\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u30b3\u30f3\u30d1\u30a4\u30eb\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u307e\u305a\u306f\u3001\u4f5c\u696d\u7528\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u3064\u304f\u308a\u307e\u3057\u3087\u3046\u3002<br>\u4eca\u56de\u306f\u3001webiker\u3068\u3044\u3046\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u4f5c\u6210\u3059\u308b\u3053\u3068\u3067\u8aac\u660e\u3092\u9032\u3081\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-lightgray-background-color has-background\"># cd \/home\/webiker\n# mkdir nginx\n# chown -R webiker:webiker nginx\n# cd nginx<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6b21\u306b\u3001\u30bd\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u3092\u843d\u3068\u3059\u305f\u3081\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-lightgray-background-color has-background\"># vi \/etc\/apt\/sources.list<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u307e\u305a\u306f\u3001deb-src\u306e\u30b3\u30e1\u30f3\u30c8\u3092\u3059\u3079\u3066\u5916\u3057\u307e\u3059\u3002<br>\u307e\u305f\u3001\u30d5\u30a1\u30a4\u30eb\u306e\u672b\u5c3e\u306b\u4ee5\u4e0b\u3092\u8ffd\u8a18\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-lightgray-background-color has-background\">deb [signed-by=\/etc\/apt\/keyrings\/nginx.gpg] http:\/\/nginx.org\/packages\/ubuntu\/ jammy nginx\ndeb-src [signed-by=\/etc\/apt\/keyrings\/nginx.gpg] http:\/\/nginx.org\/packages\/ubuntu\/ jammy nginx<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u30dd\u30a4\u30f3\u30c8\u306f\u3001\u53f3\u304b\u30892\u756a\u76ee\u306ejammy\u3067\u3059\u306d\u3002<br>\u3053\u308c\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067\u300122.04\u7528\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3055\u308c\u3066\u304d\u307e\u3059\u3002<br>\u3082\u3057\u3001Ubuntu\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u9055\u3046\u3068\u304d\u306f\u3001<a href=\"https:\/\/wiki.ubuntu.com\/Releases\" target=\"_blank\" rel=\"noreferrer noopener\">\u3053\u3053<\/a>\u3092\u53c2\u8003\u306b\u66f8\u304d\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6b21\u306b\u3001nginx\u306e\u30b5\u30a4\u30c8\u304b\u3089\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u516c\u958b\u9375\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-lightgray-background-color has-background\"># wget https:\/\/nginx.org\/keys\/nginx_signing.key<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u516c\u958b\u9375\u3092\u3001apt-key\u3067\u8ffd\u52a0\u3057\u307e\u3059\u3002<br>\u3053\u306e\u3068\u304d\u3001su\u30e6\u30fc\u30b6\u30fc\u3067\u5b9f\u65bd\u3059\u308b\u3068root\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30ad\u30fc\u304c\u4f5c\u6210\u3055\u308c\u3066\u3057\u307e\u3044\u307e\u3059\u3002<br>\u3057\u305f\u304c\u3063\u3066\u3001\u3053\u306e\u64cd\u4f5c\u306f\u4e00\u822c\u30e6\u30fc\u30b6\u30fc\u3067\u5b9f\u65bd\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-lightgray-background-color has-background\"># exit(\u4e00\u822c\u30e6\u30fc\u30b6\u30fc\u306b\u623b\u308b\uff09\n$ cd nginx\n$ gpg --no-default-keyring --keyring temp-keyring.gpg --import nginx_signing.key\n$ gpg --no-default-keyring --keyring temp-keyring.gpg --export --output nginx.gpg\n$ sudo su<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6700\u5f8c\u306b\u4f5c\u6210\u3057\u305fKey\u3092\u3001keyrings\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30b3\u30d4\u30fc\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-lightgray-background-color has-background\"># cd nginx\n# cp -p nginx.gpg \/etc\/apt\/keyrings\/<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u308c\u3067\u3001\u30bd\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u6e96\u5099\u304c\u6574\u3044\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30bd\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u3001\u305d\u306e\u4ed6\u5fc5\u8981\u306a\u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u307e\u305a\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u4f5c\u308b\u305f\u3081\u306e\u30a2\u30d7\u30ea\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-lightgray-background-color has-background\"># apt update\n# apt install dpkg-dev<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6b21\u306b\u3001\u30bd\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-lightgray-background-color has-background\"># cd \/home\/webiker\/nginx\n# apt source nginx<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u30bd\u30fc\u30b9\u306e\u6b21\u306f\u4f9d\u5b58\u30d5\u30a1\u30a4\u30eb\u3067\u3059\u3002<br>\u4f9d\u5b58\u30d5\u30a1\u30a4\u30eb\u306f\u3001\u30bd\u30fc\u30b9\u30eb\u30fc\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306edebian\/control\u306eBuild-depends\u306b\u66f8\u304b\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-lightgray-background-color has-background\"># apt install debhelper dpkg-dev quilt lsb-release libssl-dev libpcre2-dev zlib1g-dev build-essential<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u30d3\u30eb\u30c9\u3059\u308b\u305f\u3081\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-lightgray-background-color has-background\"># apt install libxml2-dev libxslt-dev<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6700\u5f8c\u306b\u3001WebDAV\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-lightgray-background-color has-background\"># git clone https:\/\/github.com\/arut\/nginx-dav-ext-module.git<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u308c\u3067\u3001\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u95a2\u4fc2\u306f\u7d42\u308f\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">nginx\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u7d44\u307f\u8fbc\u3080\u3088\u3046\u306b\u3001rule\u30d5\u30a1\u30a4\u30eb\u3092\u5909\u66f4\u3057\u307e\u3059\u3002<br>\uff08\uff0a.\uff0a.\uff0a\u306e\u90e8\u5206\u306f\u3001\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u5408\u308f\u305b\u3066\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002\uff09<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-lightgray-background-color has-background\"># vi \/home\/webiker\/nginx\/nginx-*.*.*\/debian\/rules<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u30d5\u30a1\u30a4\u30eb\u306e39\uff5e41\u884c\u76ee\u4ed8\u8fd1\u300144\uff5e46\u884c\u76ee\u4ed8\u8fd1\u306b\u3001config.status\u306e\u9805\u76ee\u304c\u3042\u308a\u307e\u3059\u3002<br>config.status\u306e\u9805\u76ee\u306f\u3001nginx\u3068nginx_debug\u306e2\u304b\u6240\u3042\u308a\u307e\u3059\u3002<br>\u305d\u308c\u305e\u308c\u306e\u6700\u5f8c\u306b\u3001&#8211;add-module=\/home\/webiker\/nginx\/nginx-dav-ext-module\u3092\u8ffd\u8a18\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-lightgray-background-color has-background\">config.status.nginx: config.env.nginx\n        cd $(BUILDDIR_nginx) &amp;&amp; \\\n        CFLAGS=\"\" .\/configure --prefix=\/etc\/nginx ... --add-module=\/home\/webiker\/nginx\/nginx-dav-ext-module\n        touch $@\n\nconfig.status.nginx_debug: config.env.nginx_debug\n        cd $(BUILDDIR_nginx_debug) &amp;&amp; \\\n        CFLAGS=\"\" .\/configure --prefix=\/etc\/nginx --sbin-path=\/usr\/sbin\/nginx ... --add-module=\/home\/webiker\/nginx\/nginx-dav-ext-module\n        touch $@<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u3053\u307e\u3067\u304f\u308c\u3070\u3001\u3042\u3068\u306f\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30d3\u30eb\u30c9\u3059\u308b\u3060\u3051\u3067\u3059\u306d\u3002<br>\u3053\u306e\u4f5c\u696d\u306f\u3001\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u30bd\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3067\u884c\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-lightgray-background-color has-background\"># cd \/home\/webiker\/nginx\/nginx-*.*.*\n# dpkg-buildpackage -uc -b<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u30d3\u30eb\u30c9\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u306f\u3001\u30bd\u30fc\u30b9\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u3072\u3068\u3064\u4e0a\u306b\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002<br>\u901a\u5e38\u7528\u3068\u30c7\u30d0\u30c3\u30b0\u7528\u306e\u3082\u306e\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u306e\u3067\u3001\u901a\u5e38\u7528\u306e\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-lightgray-background-color has-background\"># dpkg -i \/home\/webiker\/nginx\/nginx_*.*.*_*~jammy_amd64.deb<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u308c\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b8c\u4e86\u3067\u3059\u3002<br>\u5ff5\u306e\u305f\u3081\u306b\u3001\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-lightgray-background-color has-background\"># nginx -V<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u304a\u3081\u3067\u3068\u3046\u3054\u3056\u3044\u307e\u3059\u3002<br>\u3053\u308c\u3067\u3001WebDav\u304c\u4f7f\u3048\u308bnginx\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30bf\u30a4\u30c8\u30eb\u306e\u901a\u308a\u3067\u3059\u3002\u672c\u4ef6\u306b\u95a2\u3059\u308b\u60c5\u5831\u306f\u3001\u307e\u3060\u305d\u308c\u307b\u3069\u591a\u304f\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u81ea\u5206\u3078\u306e\u5099\u5fd8\u9332\u3092\u304b\u306d\u3066\u3001\u30a2\u30c3\u30d7\u3057\u3066\u304a\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002 \u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u8ffd\u52a0\u3057\u3066\u30bd\u30fc\u30b9\u3092DL\u3057\u307e\u3059\u3002 Ubuntu22.04\u3067\u3001nginx\u3092\u4f7f\u3063\u3066WebD [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":26617,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[3],"tags":[641,643,54,644],"class_list":["post-26922","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-pc-internet-smartphone","tag-22-04","tag-nginx","tag-ubuntu","tag-webdav"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/webiker.org\/yomoyama\/wp-json\/wp\/v2\/posts\/26922","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webiker.org\/yomoyama\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webiker.org\/yomoyama\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webiker.org\/yomoyama\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/webiker.org\/yomoyama\/wp-json\/wp\/v2\/comments?post=26922"}],"version-history":[{"count":0,"href":"https:\/\/webiker.org\/yomoyama\/wp-json\/wp\/v2\/posts\/26922\/revisions"}],"wp:attachment":[{"href":"https:\/\/webiker.org\/yomoyama\/wp-json\/wp\/v2\/media?parent=26922"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webiker.org\/yomoyama\/wp-json\/wp\/v2\/categories?post=26922"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webiker.org\/yomoyama\/wp-json\/wp\/v2\/tags?post=26922"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}