{"id":997,"date":"2011-03-29T12:53:59","date_gmt":"2011-03-29T09:53:59","guid":{"rendered":"http:\/\/skeletor.org.ua\/?p=997"},"modified":"2022-04-06T10:58:28","modified_gmt":"2022-04-06T07:58:28","slug":"apache-%d0%ba%d0%b0%d0%b6%d0%b4%d0%be%d0%bc%d1%83-virtual-hosty-%d0%bf%d0%be-%d0%bf%d0%be%d0%bb%d1%8c%d0%b7%d0%be%d0%b2%d0%b0%d1%82%d0%b5%d0%bb%d1%8e","status":"publish","type":"post","link":"https:\/\/skeletor.org.ua\/?p=997","title":{"rendered":"[apache] \u043a\u0430\u0436\u0434\u043e\u043c\u0443 virtual host&#8217;y \u043f\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e."},"content":{"rendered":"<p><strong><span style=\"color: #ff0000;\">1) \u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435.<\/span><\/strong><\/p>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c, \u0447\u0442\u043e \u0432\u044b \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 (\u0438\u043b\u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0439) \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440. \u0423 \u0432\u0430\u0441 \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <strong>apache+virtualhosts<\/strong>. \u0418 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441: \u043a\u0430\u043a \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0447\u0442\u043e \u0431\u044b \u043a\u0430\u0436\u0434\u044b\u0439 <strong>virtualhost<\/strong> \u043d\u0435 \u043c\u043e\u0433 \u0431\u0435\u0437\u043f\u0440\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u0447\u0430\u0442\u044c \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442 \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041e\u0431\u044b\u0447\u043d\u043e, <strong>apache<\/strong> \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438\u0437-\u043f\u043e\u0434 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <strong>www<\/strong>. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u043a\u0442\u043e-\u0442\u043e \u0438\u0437 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0437\u0430\u043b\u0438\u043b \u043d\u0430 \u0441\u0430\u0439\u0442 \u0434\u044b\u0440\u044f\u0432\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0447\u0435\u0433\u043e, \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c (\u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438) \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u043c <strong>virtualhost&#8217;\u0430\u043c<\/strong> \u043d\u0443 \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043d\u0438\u043c\u0438 \u0432\u0441\u0451, \u0447\u0442\u043e \u0445\u043e\u0447\u0435\u0442\u044c\u0441\u044f. \u0421\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u043b\u043e\u0445\u043e. \u0412\u043e\u0442 \u0435\u0441\u043b\u0438 \u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e \u0431\u044b \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u043a\u0430\u0436\u0434\u043e\u0433\u043e <strong>virtualhost&#8217;a<\/strong> \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0438\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434 \u0441\u0432\u043e\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c. \u0422\u043e\u0433\u0434\u0430, \u0434\u0430\u0436\u0435 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u0441\u043a\u0440\u0438\u043f\u0442\u0435, \u043e\u043d \u0441\u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0432\u0440\u0435\u0434\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0430\u043c\u043e\u043c\u0443 \u0441\u0435\u0431\u0435. \u0418\u043b\u0438 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0437\u0430\u043b\u0438\u0432\u0430\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0438 \u043d\u0443\u0436\u043d\u043e, \u0447\u0442\u043e \u0431\u044b \u043a\u0430\u0436\u0434\u044b\u0439 \u043c\u043e\u0433 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0432\u043e\u0438 \u0444\u0430\u0439\u043b\u044b. \u041e \u0442\u043e\u043c, \u043a\u0430\u043a \u044d\u0442\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0438 \u043f\u043e\u0439\u0434\u0451\u0442 \u0440\u0435\u0447\u044c \u0441 \u043d\u0430\u0448\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435.<\/p>\n<p><!--more--><\/p>\n<p>\u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043c\u043d\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u0449\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b:<\/p>\n<p><strong><em><span style=\"color: #ff6600;\">&#8211; \u043c\u043e\u0434\u0443\u043b\u044c SuExec + t-\u0431\u0438\u0442 \u043d\u0430 \u043f\u0430\u043f\u043a\u0438<\/span><\/em><\/strong><br \/>\n<strong><span style=\"color: #ff6600;\"> &#8211; \u043c\u043e\u0434\u0443\u043b\u044c mod_become (http:\/\/nixbit.com\/cat\/internet\/nttp-(www)\/mod-become\/)<\/span><\/strong><br \/>\n<strong><em><span style=\"color: #ff6600;\"> &#8211; \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c mpm (itk, peruser)<\/span><\/em><\/strong><br \/>\n<strong><em><span style=\"color: #ff6600;\">&#8211; \u043c\u043e\u0434\u0443\u043b\u044c mod_ruid2 (<a rel=\"nofollow\" href=\"http:\/\/sourceforge.net\/projects\/mod-ruid\/\">http:\/\/sourceforge.net\/projects\/mod-ruid\/<\/a>)<\/span><\/em><\/strong><\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0438 \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u0435\u043d, \u043d\u043e \u0437\u0430\u043b\u0438\u0442\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0431\u0443\u0434\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 <strong>www:www<\/strong>, \u0447\u0442\u043e \u043d\u0435 \u0434\u043e \u043a\u043e\u043d\u0446\u0430 \u0440\u0435\u0448\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443. \u0412\u043e-\u0432\u0442\u043e\u0440\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u043e\u0435\u043a\u0442 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u0438 \u043d\u0435 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442\u0441\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u044e 3-\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u0432 2-\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f\u0445: itk \u0438 peruser.<\/p>\n<p><strong><em><span style=\"color: #008000;\">\u0421\u0442\u0435\u043d\u0434:<\/span><\/em><\/strong> <strong>FreeBSD 8.0 Release, apache 2.2.14_5<\/strong><\/p>\n<p><strong><span style=\"color: #ff0000;\">2)ITK (\u0434\u043e\u043c\u0430\u0448\u043d\u044f\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 http:\/\/mpm-itk.sesse.net\/)<\/span><\/strong><\/p>\n<p>\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u043f\u043e\u0440\u0442\u044b \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441 <strong>apache&#8217;\u0435\u043c<\/strong>:<\/p>\n<p><code>$cd \/usr\/ports\/www\/apache22\/files<\/code><\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u043b\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f itk:<\/p>\n<p><code># ls | grep itk<br \/>\nmpm-itk-20090414-00<\/code><\/p>\n<p>\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043f\u0430\u0442\u0447 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442. \u0415\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442, \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u0447\u0430\u0435\u043c \u0432\u0440\u0443\u0447\u043d\u0443\u044e:<\/p>\n<p><code>#fetch http:\/\/mpm-itk.sesse.net\/apache2.2-mpm-itk-20090414-00.patch<\/code><\/p>\n<p>\u0417\u0430\u043c\u0435\u0447\u0443, \u0447\u0442\u043e \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u043f\u0430\u0442\u0447 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 <strong>apache 2.2.6<\/strong> \u0438 \u0432\u044b\u0448\u0435.<br \/>\n\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 <strong>\/usr\/ports\/www\/apache22<\/strong>, \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c <strong>Makefile<\/strong>, \u0438\u0449\u0435\u043c \u0441\u0442\u0440\u043e\u0447\u043a\u0443 <strong>&#8220;WITH_MPM?=prefork&#8221;<\/strong> \u0438 \u043c\u0435\u043d\u044f\u0435\u043c <strong>prefork<\/strong> \u043d\u0430<strong> itk<\/strong>. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0442\u0430\u043a\u043e\u0435:<\/p>\n<p><code>WITH_MPM?= &nbsp; &nbsp; &nbsp;itk<\/code><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0441\u0442\u0430\u0432\u0438\u043c <strong>apache<\/strong>:<\/p>\n<p><code>#make install clean<\/code><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0441\u0451 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0438 \u0431\u0435\u0437 \u043e\u0448\u0438\u0431\u043e\u043a, \u0442\u043e \u0432 \u043a\u043e\u043d\u0446\u0435 \u0443\u0432\u0438\u0434\u0438\u043c \u0442\u0430\u043a\u0443\u044e \u0441\u0442\u0440\u043e\u0447\u043a\u0443<\/p>\n<p><code>===&gt; &nbsp;Cleaning for apache-itk-2.2.14_5<\/code><\/p>\n<p>\u0447\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0432\u0441\u0451-\u0442\u0430\u043a\u0438 \u043d\u0435 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 <strong>apache<\/strong>, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e, \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 <strong>itk<\/strong>. \u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432, \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0445 \u043d\u0438\u0436\u0435:<\/p>\n<p><code>\u0430) $apachectl -l | grep itk<br \/>\nitk.c<\/code><\/p>\n<p><code>\u0431) $httpd -V | grep -i mpm<br \/>\nServer MPM: &nbsp; &nbsp; ITK<br \/>\n-D APACHE_MPM_DIR=\"server\/mpm\/experimental\/itk\"<\/code><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b\u0432\u043e\u0434 \u043d\u0435 \u043f\u0443\u0441\u0442\u043e\u0439 &#8211; \u0437\u043d\u0430\u0447\u0438\u0442, \u0432\u0441\u0451 \u0432\u043f\u043e\u0440\u044f\u0434\u043a\u0435. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435. \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b <strong>httpd.conf<\/strong> \u0438 \u0440\u0430\u0441\u0441\u043a\u043e\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0438 (\u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0443 \u0432\u0430\u0441 \u0440\u0430\u043d\u0435\u0435 \u043d\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0438\u043b\u0438 \u0440\u0430\u0441\u0441\u043a\u043e\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b): \u043f\u0435\u0440\u0432\u0430\u044f \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f mpm, \u0432\u0442\u043e\u0440\u0430\u044f &#8211; \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0444\u0430\u0439\u043b \u0441 <strong>virtualhost&#8217;\u0430\u043c\u0438<\/strong>:<\/p>\n<p><code>Include etc\/apache22\/extra\/httpd-mpm.conf<br \/>\nInclude etc\/apache22\/extra\/httpd-vhosts.conf<\/code><\/p>\n<p>\u0414\u043b\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0433\u0440\u0443\u043f\u043f\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <strong>AssignUserID<\/strong>. \u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435:<\/p>\n<p><code>NameVirtualHost *:80<br \/>\n&lt;VirtualHost *:80&gt;<br \/>\nServerAdmin webmaster@srv.com<br \/>\nDocumentRoot \"\/usr\/local\/www\/apache22\/data\"<br \/>\nServerName mainsite.com<br \/>\nErrorLog \"\/var\/log\/httpd-error.log\"<br \/>\nCustomLog \"\/var\/log\/httpd-access.log\" common<br \/>\nAssignUserID www www<br \/>\n&lt;\/VirtualHost&gt;<br \/>\n&lt;VirtualHost *:80&gt;<br \/>\nServerAdmin webmaster@srv1.com<br \/>\nDocumentRoot \"\/usr\/local\/www\/srv1\"<br \/>\nServerName srv1.com<br \/>\nErrorLog \"\/var\/log\/srv1.com.err\"<br \/>\nCustomLog \"\/var\/log\/srv1.com.log\" common<br \/>\nAssignUserID srv1 www<br \/>\n&lt;\/VirtualHost&gt;<br \/>\n&lt;VirtualHost *:80&gt;<br \/>\nServerAdmin webmaster@srv2.com<br \/>\nDocumentRoot \"\/usr\/local\/www\/srv2\"<br \/>\nServerName srv2.com<br \/>\nErrorLog \"\/var\/log\/srv2.com.err\"<br \/>\nCustomLog \"\/var\/log\/srv2.com.log\" common<br \/>\nAssignUserID srv2 www<br \/>\n&lt;\/VirtualHost&gt;<\/code><\/p>\n<p><strong><em><span style=\"color: #ff6600;\">\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435.<\/span><\/em><\/strong><\/p>\n<p>\u0427\u0442\u043e \u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u0443 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432 <strong>ISPmanager<\/strong>, \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0434\u043e\u0431\u0430\u0432\u044c\u0438\u0435 \u043e\u043f\u0446\u0438\u044e \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 <strong>Apache MPM<\/strong>:<\/p>\n<p><code>Option ApacheMPM<\/code><\/p>\n<p>\u0412 <strong>DirectAdmin<\/strong> \u0432 <strong>Templates<\/strong> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0434\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430 <strong>httpd.conf<\/strong>. \u0422\u0430\u043a\u0436\u0435, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0441 \u0440\u043e\u0434\u043d\u043e\u0433\u043e&nbsp;\u043a\u043e\u043d\u0444\u0438\u0433-\u0444\u0430\u0439\u043b\u0430<\/p>\n<p><strong><span style=\"color: #ff0000;\">3)Peruser (\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0430\u0439\u0442 http:\/\/www.peruser.org\/trac\/peruser)<\/span><\/strong><\/p>\n<p>\u0418\u0434\u0451\u043c \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u043f\u043e\u0440\u0442\u0430 \u0441 <strong>apach&#8217;\u0435\u043c (\/usr\/ports\/www\/apache22)<\/strong>, \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c <strong>Makefile<\/strong>, \u0438\u0449\u0435\u043c \u0441\u0442\u0440\u043e\u0447\u043a\u0443 <strong>WITH_MPM?<\/strong> \u0438 \u0441\u0442\u0430\u0432\u0438\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <strong>peruser<\/strong>:<\/p>\n<p><code>WITH_MPM?=peruser<\/code><\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u043d\u0430\u0441 \u0436\u0434\u0451\u0442 \u0441\u044e\u0440\u043f\u0440\u0438\u0437: \u0432 \u043f\u043e\u0440\u0442\u0430\u0445 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u043f\u043e\u0440\u0442 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <strong>apache22-peruser-mpm<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u0430\u043a \u0440\u0430\u0437 \u0438 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e. \u041d\u0443 \u0447\u0442\u043e \u0436, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0438 \u0441\u0442\u0430\u0432\u0438\u043c:<\/p>\n<p><code># cd \/usr\/ports\/www\/apache22-peruser-mpm\/<br \/>\n# make install clean<br \/>\n<\/code><br \/>\n\u0415\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u0443 \u0432\u0430\u0441 \u0432\u044b\u043b\u0435\u0437\u043b\u0430 \u0442\u0430\u043a\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430:<\/p>\n<p><code>===&gt; &nbsp;apache-peruser-2.2.14_5 Sorry, &nbsp;and apache versions are out of sync.<br \/>\n*** Error code 1<br \/>\nStop in \/usr\/ports\/www\/apache22-peruser-mpm.<br \/>\n<\/code><br \/>\n\u0442\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b <strong>Makefile<\/strong> \u0438 \u043f\u043e\u0434\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0440\u0435\u043b\u0438\u0437 apache&#8217;\u0430 \u043d\u0430 \u0442\u043e\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0432 \u043f\u043e\u0440\u0442\u0430\u0445. \u0423 \u043c\u0435\u043d\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u0435\u0440\u0441\u0438\u044f <strong>apach&#8217;a<\/strong> \u0431\u044b\u043b\u0430 <strong>2.2.14_5<\/strong>, \u0430 \u0432 <strong>Makefile<\/strong> \u043f\u043e\u0440\u0442\u0430 <strong>apache22-peruser-mpm<\/strong> \u0431\u044b\u043b\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u044f <strong>2.2.13<\/strong>. \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043b<\/p>\n<p><code>SLAVE_DESIGNED_FOR= &nbsp; &nbsp; 2.2.13<\/code><\/p>\n<p>\u043d\u0430<\/p>\n<p><code>SLAVE_DESIGNED_FOR= &nbsp; &nbsp; 2.2.14<\/code><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u0435\u0449\u0451 \u0440\u0430\u0437. \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 (\u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432, \u043c\u043e\u0436\u043d\u043e \u0438 \u043e\u0431\u0435\u0438\u043c\u0438):<\/p>\n<p><code>$apachectl -l | grep peruser<br \/>\nperuser.c<br \/>\n$httpd -V | grep -i mpm<br \/>\nServer MPM: &nbsp; &nbsp; Peruser<br \/>\n-D APACHE_MPM_DIR=\"server\/mpm\/experimental\/peruser\"<\/code><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435. \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b <strong>httpd.conf<\/strong> \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<p><code>&lt;IfModule peruser.c&gt;<br \/>\n# Multiplexer pool<br \/>\nMinMultiplexers 3<br \/>\nMaxMultiplexers 20<br \/>\nMultiplexer www www<br \/>\nProcessorWaitTimeout 2 10<br \/>\n# Fork limits<br \/>\nServerLimit 20<br \/>\nMaxClients 20<br \/>\nMaxRequestsPerChild 1000<br \/>\n# Processor defaults<br \/>\nMinProcessors &nbsp; &nbsp; &nbsp; 0<br \/>\nMinSpareProcessors &nbsp;3<br \/>\nMaxProcessors &nbsp; &nbsp; &nbsp; 10<br \/>\n# Timeouts<br \/>\nIdleTimeout 60<br \/>\nExpireTimeout 300<br \/>\n&lt;Processor srv1&gt;<br \/>\nUser srv1<br \/>\nGroup www<br \/>\n&lt;\/Processor&gt;<br \/>\n&lt;Processor srv2&gt;<br \/>\nUser srv2<br \/>\nGroup www<br \/>\n&lt;\/Processor&gt;<br \/>\n&lt;\/IfModule&gt;<br \/>\nInclude etc\/apache22\/extra\/httpd-vhosts.conf<\/code><\/p>\n<p>\u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u043c\u043e\u0435\u0433\u043e <strong>httpd-vhosts.conf<\/strong>:<\/p>\n<p><code>&lt;VirtualHost *:80&gt;<br \/>\nServerAdmin webmaster@srv1.com<br \/>\nDocumentRoot \"\/usr\/local\/www\/srv1\"<br \/>\nServerName srv1.com<br \/>\nErrorLog \"\/var\/log\/srv1.com.err\"<br \/>\nCustomLog \"\/var\/log\/srv1.com.log\" common<br \/>\n&lt;IfModule peruser.c&gt;<br \/>\nServerEnvironment srv1<br \/>\n&lt;\/IfModule&gt;<br \/>\n&lt;\/VirtualHost&gt;<br \/>\n&lt;VirtualHost *:80&gt;<br \/>\nServerAdmin webmaster@srv2.com<br \/>\nDocumentRoot \"\/usr\/local\/www\/srv2\"<br \/>\nServerName srv2.com<br \/>\nErrorLog \"\/var\/log\/srv2.com.err\"<br \/>\nCustomLog \"\/var\/log\/srv2.com.log\" common<br \/>\n&lt;IfModule peruser.c&gt;<br \/>\nServerEnvironment srv2<br \/>\n&lt;\/IfModule&gt;<br \/>\n&lt;\/VirtualHost&gt;<\/code><\/p>\n<p>\u041d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u043c\u043e\u0434\u0443\u043b\u044f \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 <strong>&lt;IfModule peruser.c&gt;<\/strong><\/p>\n<p><em><strong><span style=\"color: #ff6600;\">\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435.<\/span><\/strong><\/em><\/p>\n<p>\u041a\u0430\u043a \u043f\u0438\u0448\u0443\u0442 \u0432 \u0441\u0435\u0442\u0438, \u043c\u043e\u0433\u0443\u0442 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c\u0441\u044f &nbsp;\u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u043d\u0430 <strong>FreeBSD<\/strong>.<\/p>\n<p><em><span style=\"color: #993366;\">\u041e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u043e \u0441 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0436\u0443\u0440\u043d\u0430\u043b\u0430 root.ua<\/span><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1) \u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435. \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c, \u0447\u0442\u043e \u0432\u044b \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 (\u0438\u043b\u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0439) \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440. \u0423 \u0432\u0430\u0441 \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f apache+virtualhosts. \u0418 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441: \u043a\u0430\u043a \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0447\u0442\u043e \u0431\u044b \u043a\u0430\u0436\u0434\u044b\u0439 virtualhost \u043d\u0435 \u043c\u043e\u0433 \u0431\u0435\u0437\u043f\u0440\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u0447\u0430\u0442\u044c \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442 \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041e\u0431\u044b\u0447\u043d\u043e, apache \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438\u0437-\u043f\u043e\u0434 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f www. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u043a\u0442\u043e-\u0442\u043e \u0438\u0437 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0437\u0430\u043b\u0438\u043b \u043d\u0430 \u0441\u0430\u0439\u0442 \u0434\u044b\u0440\u044f\u0432\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,15],"tags":[],"class_list":["post-997","post","type-post","status-publish","format-standard","hentry","category-freebsd","category-www"],"_links":{"self":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/997","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=997"}],"version-history":[{"count":7,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/997\/revisions"}],"predecessor-version":[{"id":5901,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/997\/revisions\/5901"}],"wp:attachment":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=997"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=997"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=997"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}