{"id":308,"date":"2015-12-11T08:37:45","date_gmt":"2015-12-10T23:37:45","guid":{"rendered":"http:\/\/www.kinryo.net\/?p=308"},"modified":"2020-08-09T16:01:01","modified_gmt":"2020-08-09T07:01:01","slug":"%ef%bc%91%ef%bc%92%ef%bc%9a%e3%82%b2%e3%82%b9%e3%83%88%e3%81%abapache%e3%82%92%e8%a8%ad%e5%ae%9a-2","status":"publish","type":"post","link":"https:\/\/www.kinryo.net\/?p=308","title":{"rendered":"\uff11\uff12\uff1a\u30b2\u30b9\u30c8\u306bapache\u3092\u8a2d\u5b9a-2"},"content":{"rendered":"<div class=\"itemBody\">\n<p class=\"itemText\">webdata\u7528\u306b\u9818\u57df\u3092\u5272\u308a\u5f53\u3066\u305f\u306e\u3067\u3001fstab\u306b\u305d\u306e\u8a18\u8ff0 \u3092\u3059\u308b\u304c\uff08\u30db\u30b9\u30c8\u5074\u304b\u3089\u6307\u5b9a\u3055\u308c\u308b\u9818\u57df\u3092\u6c7a\u3081\u3066\u304a\u304f\uff08\u4f8b\uff1a\/dev\/sde\u3000\u30de\u30a6\u30f3\u30c8\u30dd\u30a4\u30f3\u30c8\u3000ext4\u30001 4\u3002\u6700\u5f8c\u306e\u6570\u5b57\u306f\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3059\u308b\u304b\u3068\u305d\u306e\u9806\u756a\u3060\u304c\u3001\u79c1\u304c\u4f7f\u3046\u4e88\u5b9a\u306e amanda \u3067\u95a2\u4fc2\u3059\u308b\u306e\u304b\u306a\u30fc\u3001\u4e0d\u660e\u3067\u3042\u308b\uff09\u3001\u307e\u3060\u30db\u30b9\u30c8\u5074\u304b\u3089\u5272\u308a\u5f53\u3066\u3066\u3082\u3089\u3063\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u3042\u304f\u307e\u3067\u8a18\u5165\u306e\u307f\u3002\u53c8\u3001\u3053\u3053\u3092\u9593\u9055\u3048\u308b\u3068\u8d77\u52d5\u306b\u5931\u6557\u3059\u308b\u306e\u3067\u3001\u614e\u91cd \u306b\u3002<br \/>\n\u79c1\u306f\u3053\u3053\u3067\u5931\u6557\u3092\u3057\u305f\u3002\u6700\u521d\u306f \/dev\/sde1 \u3068\u6700\u5f8c\u306b\u6570\u5b57\u3092\u4ed8\u3051\u3066\u3044\u305f\u3089\u3001\u518d\u8d77\u52d5\u6642\u306b\u30a8\u30e9\u30fc\u304c\u51fa\u305f\u3002KVM\u3067\u306f\u30db\u30b9\u30c8\u304b\u3089\u30b2\u30b9\u30c8\u306b\u9818\u57df\u3092\u6e21\u3059\u6642\u6570\u5b57\u3092\u4ed8\u3051\u308b\u3068\u6e21\u3055\u308c\u305f\u9818\u57df\u306b\u3055\u3089\u306b\u9818\u57df\u304c\u3042\u308b\u3068\u601d\u3046\u69d8\u3060\u3002\u3060\u304b\u3089\u6570\u5b57\u306f\u4ed8\u3051\u3066\u306f\u3044\u3051\u306a\u3044\u3002<br \/>\n\u30b2\u30b9\u30c8\u306e\u518d\u8d77\u52d5\u306b\u5931\u6557\u3057\u3001\u9014\u4e2d\u3067\u6b62\u307e\u3063\u305f\u3089\u3001root\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u308c\u3001halt\u3067\u30b2\u30b9\u30c8\u3092\u6b62\u3081\u308b\u3002\u30db\u30b9\u30c8\u5074\u306b\u30b2\u30b9\u30c8\u306e\u9818\u57df\u3092\u30de\u30a6\u30f3\u30c8\uff08\uff11\uff10\uff1a\u30b2\u30b9\u30c8\u306e\u9818\u57df\u3092\u30de\u30a6\u30f3\u30c8\u3059\u308b\u5834\u5408\u3092\u53c2\u7167\uff09\u3057\u3001\u8a02\u6b63\u5f8c\u3001\u518d\u8d77\u52d5\u3002<br \/>\n\u6b21\u306bwebdata\u7528\u306e\u30de\u30a6\u30f3\u30c8\u30dd\u30a4\u30f3\u30c8\u3092\u4f5c\u3063\u3066\u7f6e\u304f\u3002<br \/>\n\u3053\u3053\u3067\u4e00\u5ea6\u30b7\u30e3\u30c3\u30c8\u30c0\u30a6\u30f3\u3057\u3001\u30db\u30b9\u30c8\u5074\u306e\u8a2d\u5b9a\u3092\u3059\u308b\u3002<br \/>\n\u3053\u308c\u304b\u3089\u306f\u30db\u30b9\u30c8\u5074\u306e\u8a2d\u5b9a\u3002<br \/>\n\u8d77\u52d5\u8a2d\u5b9a\u306e\u5909\u66f4<br \/>\ngedit \/etc\/libvirt\/qemu\/\u30b2\u30b9\u30c8\u540d.xml \u306b\u4e0b\u8a18\u306e\u8a2d\u5b9a\u3092\u8ffd\u52a0\u3002<\/p>\n<div class=\"xoopsCode\">\n<pre><span style=\"color: #0000ff;\"><code>&lt;disk type='block' device='disk'&gt;\r\n    &lt;driver name='qemu' type='raw' cache='none' io='native'\/&gt;\r\n    &lt;source dev='\/dev\/Data\/webdata'\/&gt;\r\n    &lt;target dev='vde' bus='virtio'\/&gt;\r\n    &lt;address type='pci' domain='0x0000' bus='0x00' slot='0x0A' function='0x0'\/&gt;\r\n&lt;\/disk&gt;<\/code><\/span><\/pre>\n<\/div>\n<p>\u591a\u5206\u5834\u6240\u306f\u3069\u3053\u3067\u3082\u3044\u3044\u3068\u601d\u3046\u304c\u3001\u79c1\u306f\u4e00\u9023\u306e\u9818\u57df (&lt;disk&gt;)\u306e\u8a2d\u5b9a\u306e\u6700\u5f8c\u306b\u4ed8\u3051\u52a0\u3048\u305f\u3002&#8217;vde&#8217;\u306f\u30b2\u30b9\u30c8\u306e\/etc\/fstab\u306b\u8a18\u8f09\u306b\u5408\u308f\u305b\u308b\u4e8a\u3001slot=&#8217;0x0A&#8217; \u306fslot\u3067\u691c\u7d22\u3057\u3001\u4f7f\u3063\u3066\u3044\u308b\u6700\u5f8c\u306e\u756a\u53f7\u306e\u6b21\u306b\u3059\u308b\u3053\u3068\u3002\u53c8\u3001\u524d\u306b\u306f\u5909\u66f4\u3057\u7121\u304b\u3063\u305futc\u3060\u304c\u6c17\u6301\u3061\u60aa\u3044\u306e\u3067 \uff1cclock offset=&#8217;localtime&#8217;\/&gt; \u306b\u5909\u66f4\u3057\u305f\u3002<br \/>\n\u53c8\u3001\u3053\u3053\u3067\u5931\u6557\u3002\u3069\u3093\u306a\u306b\u8a2d\u5b9a\u3092\u898b\u76f4\u3057\u3066\u3082\u5408\u3063\u3066\u3044\u308b\u306e\u306b\u3001\u540c\u3058\u5834\u6240\u3067\u30a8\u30e9\u30fc\u304c\u51fa\u308b\u3002\/dev\/sde \u4f55\u3066\u30c7\u30d0\u30a4\u30b9\u306f\u7121\u3044\u3068\u8a00\u308f\u308c\u308b\u3002<br \/>\n\u9045\u304b\u3063\u305f\u4e8b\u3082\u3042\u3063\u3066\u3001\u305d\u306e\u65e5\u306f\u5bdd\u305f\u3002\u6b21\u306e\u65e5\u30db\u30b9\u30c8\u3092\u8d77\u52d5\u3057\u3001\u30b2\u30b9\u30c8\u3092\u8d77\u52d5\u3059\u308b\u3068\u4f55\u4e8b\u3082\u7121\u304b\u3063\u305f\u306e\u69d8\u306b\u6b63\u5e38\u8d77\u52d5\u3057\u305f\u3002\u30b0\u30b0\u308b\u3068 virsh define \/etc\/libvirt\/qemu\/\u30b2\u30b9\u30c8.xml \u3068\u5b9a\u7fa9\u3092\u518d\u8aad\u307f\u8fbc\u307f\u3055\u305b\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u307f\u305f\u3044\u3002<br \/>\n\u5f8c \u65e5\u306e\u70ba\u306b\u308f\u3056\u3068 .xml \u30d5\u30a1\u30a4\u30eb\u3092\u3044\u3058\u308a\u30c6\u30b9\u30c8\u3059\u308b\u3002libvirt \u3092\u518d\u8d77\u52d5\u3057\u305f\u3089\u3044\u3044\u306e\u3067\u306f\u3068\u601d\u3044 service libvirtd restart \u3067\u518d\u8d77\u52d5\u3057\u305f\u3089\u3001\u4eee\u60f3\u30de\u30b7\u30f3\u30de\u30cd\u30fc\u30b8\u30e3\u306b &#8220;localhost(qemu) &#8211; not connected&#8221; \u3068\u8868\u793a\u3055\u308c\u305f\u3002\u3053\u3053\u306f\u614c\u3066\u305a\u3001\u53f3\u30af\u30ea\u30c3\u30af\u3057\u3001\u63a5\u7d9a\u3092\u30af\u30ea\u30c3\u30af\u3067\u8868\u793a\u3055\u308c\u305f\u3002\u3053\u308c\u3067\u3082\u3044\u3044\u3051\u3069\u3001\u3084\u3063\u3071\u308a\u738b\u9053\u3092\u3044\u304f\u3079\u304d\u3060\u3002<\/p>\n<p>\u3084\u3063\u3068\u6b63\u5e38\u306b\u306a\u3063\u305f\u306e\u3067\u3001\u30b2\u30b9\u30c8\u3092\u8d77\u52d5\u3057\u3001\u3053\u3053\u304b\u3089\u53c8\u3001\u30b2\u30b9\u30c8\u3067\u306e\u64cd\u4f5c\u3002<br \/>\n\u4eca\u5ea6\u306f\u30b2\u30b9\u30c8\u304b\u3089\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u306b\u7e4b\u304c\u3089\u306a\u3044\u3002<br \/>\n\u539f\u56e0\u306f\u4e0d\u660e\u3060\u304c\u3001\u3069\u3046\u3044\u3046\u8a33\u304b &#8220;NetworkManager&#8221; \u304c\u8d70\u3063\u3066\u3044\u305f\u306e\u3067\u3001\u3053\u308c\u3092\u6b62\u3081\u3001\/etc\/resolve.conf \u3092\u66f8\u304d\u76f4\u3057\u3001service network restart \u3067OK\u306b\u306a\u3063\u305f\u3002<br \/>\n\u30b2\u30b9\u30c8\u306e\u518d\u8d77\u52d5\u3067\u968f\u5206\u6642\u9593\u3092\u3068\u3089\u308c\u305f\u304c\u3001<br \/>\n\u3053\u3053\u3067\u3084\u3063\u3068 virtualhost \u306e\u8a2d\u5b9a\u3092\u3059\u308b\u3002<br \/>\n\/etc\/httpd\/conf.d\/virtualhost.conf \u306b<\/p>\n<div class=\"xoopsCode\">\n<pre><span style=\"color: #0000ff;\"><code>NameVirtualHost *:80\r\n# kinryokai\r\n&lt;VirtualHost *:80&gt;\r\n    DocumentRoot \/webdata\/public\/kinryokai\r\n    ServerName www.kinryokai.net\r\n    ServerAlias kinryokai.net\r\n    ErrorLog logs\/kinryokai_error_log\r\n    CustomLog logs\/kinryokai_access_log combined env=!no_log\r\n    &lt;Directory \"\/webdata\/public\/kinryokai\/upfiles\"&gt;\r\n        SetEnvIf Referer \"^http:\/\/www\\..kinryokai\\.net\" ref_ok\r\n        order deny,allow\r\n        deny from all\r\n        allow from env=ref_ok\r\n    &lt;\/Directory&gt;\r\n    &lt;Directory \"\/webdata\/public\/kinryokai\/uploads\"&gt;\r\n        SetEnvIf Referer \"^http:\/\/www\\.kinryokai\\.net\" ref_ok\r\n        order deny,allow\r\n        deny from all\r\n        allow from env=ref_ok\r\n    &lt;\/Directory&gt;\r\n    ScriptAlias \/cgi-kinryo\/ \"\/webdata\/cgi\/cgi-kinryo\/\"\r\n    &lt;Directory \"\/webdata\/cgi\/cgi-kinryo\"&gt;\r\n        AllowOverride None\r\n        Options None\r\n        SetEnvIf Referer \"^http:\/\/www\\.kinryokai\\.net\" cgi-kinryo_ok\r\n        order deny,allow\r\n        deny from all\r\n        allow from env=cgi-kinryo_ok\r\n    &lt;\/Directory&gt;\r\n&lt;\/VirtualHost&gt;<\/code><\/span><\/pre>\n<\/div>\n<p>\u3053\u306e\u8a2d\u5b9a\u306e\u610f\u5473\u306f<a href=\"https:\/\/centossrv.com\/apache.shtml\" target=\"_blank\" rel=\"noopener noreferrer\">centocsrv.com\u3092\u53c2\u8003<\/a>\u306b\u3057\u3066\u304f\u3060\u3055\u3044<br \/>\n\u53c8\u3001 &#8220;\/webdata\/public\/kinryokai\/upfiles&#8221;\u3068 &#8220;\/webdata\/public\/kinryokai\/uploads&#8221; \u306e\u8a2d\u5b9a\u306f\u3053\u3053\u306b\u753b\u50cf\u306a\u3069\u3092\u7f6e\u3044\u3066\u304a\u304f\u306e\u3067\u3001\u4ed6\u306eWEB\u304b\u3089\u30ea\u30f3\u30af\u3092\u5f35\u3089\u308c\u3001\u9045\u304f\u306a\u308b\u306e\u3092\u9632\u3050\u8a2d\u5b9a\u3067\u3059\u3002<br \/>\n\u3082\u3046\u4e00\u5ea6 conf \u306e\u30c1\u30a7\u30c3\u30af<br \/>\n<span style=\"color: #ff6600;\">#<\/span><span style=\"color: #008000;\"> apachctl configtest<\/span><br \/>\n\u3082\u3057\u30a8\u30e9\u30fc\u304c\u51fa\u305f\u3089\u8a2d\u5b9a\u3092\u898b\u76f4\u3059\u3002webdav\u306e\u8a2d\u5b9a\u304c\u307e\u3060\u3067\u3059\u304c\u3001\u5f8c\u3067\u3084\u308a\u307e\u3059\u3002<br \/>\n\u30a8\u30e9\u30fc\u304c\u7121\u3051\u308c\u3070apache\u3092\u8d70\u3089\u3059\u3002<br \/>\n<span style=\"color: #ff6600;\">#<\/span><span style=\"color: #008000;\"> service httpd start<\/span><br \/>\n<span style=\"color: #ff6600;\">#<\/span><span style=\"color: #008000;\"> chkconfig httpd on<\/span><br \/>\n\u5185\u90e8\u306e\u4ed6\u306e\u30db\u30b9\u30c8\u304b\u3089\u53d7\u3051\u308b\u305f\u308180\u756a\u3068443\u756a\u3092\u958b\u3051\u307e\u3059\u3002<br \/>\n\/root\/iptables.sh\u306e<\/p>\n<div class=\"xoopsCode\">\n<pre><span style=\"color: #0000ff;\"><code>iptables -A INPUT -p tcp --dport 80 -j ACCEPT\u3000\uff03\u3000\u884c\u982d\u306e#\u3092\u53d6\u308a\u30b3\u30e1\u30f3\u30c8\u3092\u5916\u3059\u3002\r\niptables -A INPUT -p tcp --dport 443 -j ACCEPT\u3000\uff03\u3000\u884c\u982d\u306e#\u3092\u53d6\u308a\u30b3\u30e1\u30f3\u30c8\u3092\u5916\u3059\u3002<\/code><\/span><\/pre>\n<\/div>\n<p><span style=\"color: #ff6600;\">#<\/span> sh iptables.sh<br \/>\n\u3067\u8a2d\u5b9a\u3092\u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002\uff08\u6642\u9593\u304c\u304b\u304b\u308a\u307e\u3059\uff09<br \/>\n\u3053\u306e\u74b0\u5883\u306f\u30c6\u30b9\u30c8\u306a\u306e\u3067\u5916\u90e8\u304b\u3089\u306f\u53d7\u3051\u4ed8\u3051\u307e\u305b\u3093\u304c\u3001\u5fc5\u8981\u306a\u3089\u30eb\u30fc\u30bf\u30fc\u306e\u8a2d\u5b9a\u3092\u5fd8\u308c\u305a\u306b\u3002<br \/>\nweb\u306e\u30c1\u30a7\u30c3\u30af\u306f<a href=\"http:\/\/centossrv.com\/apache.shtml\" target=\"_blank\" rel=\"noopener noreferrer\">centocsrv.com\/apache.shtml\u3092\u53c2\u8003<\/a>\u306b\u884c\u3044\u307e\u3059\u304c\u3001local network\u306e\u5916\u304b\u3089\u3068\uff08\u73fe\u7528\u306eWEB\u304c\u52d5\u3044\u3066\u3044\u308b\uff09\u3001.htaccess\u306f\u3084\u308a\u307e\u305b\u3093\u3067\u3057\u305f\uff08\u4f7f\u308f\u306a\u3044\u65b9\u91dd\uff09\u3002<br \/>\n\u591a\u5206\u79c1\u306e\u74b0\u5883\u3060\u3051\u3060\u3068\u601d\u3044\u307e\u3059\u304c\u3001http:\/\/localhost \u3067\u306f\u771f\u3063\u767d\u306a\u753b\u9762\u306b\u306a\u3063\u305f\u3002(\u539f\u56e0\uff1aXOOPS\u3067\u4f5c\u3063\u3066\u3042\u308bWEB\u306e\u30c7\u30fc\u30bf\u30fc\u3092\u30b3\u30d4\u30fc\u3057\u305f\u304c\u3001mysql\u306e\u8a2d\u5b9a\u3068\u3001php-mysql\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u7d42\u308f\u3063\u3066\u3044\u306a\u3044\u70ba\u3060\u3063\u305f\uff09<br \/>\nhttp:\/\/localhost\/index.html \u3067\u6b63\u5e38\u306b\u8868\u793a\u3055\u308c\u305f\u3002<\/p>\n<\/div>\n<div class=\"itemFoot\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>webdata\u7528\u306b\u9818\u57df\u3092\u5272\u308a\u5f53\u3066\u305f\u306e\u3067\u3001fstab\u306b\u305d\u306e\u8a18\u8ff0 \u3092\u3059\u308b\u304c\uff08\u30db\u30b9\u30c8\u5074\u304b\u3089\u6307\u5b9a\u3055\u308c\u308b\u9818\u57df\u3092\u6c7a\u3081\u3066\u304a\u304f\uff08\u4f8b\uff1a\/dev\/sde\u3000\u30de\u30a6\u30f3\u30c8\u30dd\u30a4\u30f3\u30c8\u3000ext4\u30001 4\u3002\u6700\u5f8c\u306e\u6570\u5b57\u306f\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3059\u308b\u304b\u3068\u305d\u306e\u9806\u756a\u3060\u304c\u3001\u79c1\u304c &hellip; <a href=\"https:\/\/www.kinryo.net\/?p=308\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"sns_share_botton_hide":"","vkExUnit_sns_title":"","_vk_print_noindex":"","sitemap_hide":"","_veu_custom_css":"","veu_display_promotion_alert":"","vkexunit_cta_each_option":"","footnotes":""},"categories":[7],"tags":[],"class_list":["post-308","post","type-post","status-publish","format-standard","hentry","category-centos6"],"acf":[],"veu_head_title_object":{"title":"","add_site_title":""},"_links":{"self":[{"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/posts\/308","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=308"}],"version-history":[{"count":9,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/posts\/308\/revisions"}],"predecessor-version":[{"id":1646,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/posts\/308\/revisions\/1646"}],"wp:attachment":[{"href":"https:\/\/www.kinryo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=308"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=308"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=308"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}