{"id":840,"date":"2014-05-13T18:22:32","date_gmt":"2014-05-13T14:22:32","guid":{"rendered":"http:\/\/elemc.name\/wordpress\/?page_id=840"},"modified":"2014-05-13T18:23:02","modified_gmt":"2014-05-13T14:23:02","slug":"httpd-php-mysql-lamp-%d0%b2-fedora-%d0%b4%d0%bb%d1%8f-%d1%80%d0%b0%d0%b7%d1%80%d0%b0%d0%b1%d0%be%d1%82%d1%87%d0%b8%d0%ba%d0%b0-php","status":"publish","type":"page","link":"https:\/\/elemc.name\/?page_id=840","title":{"rendered":"httpd + php + mysql (LAMP) \u0432 Fedora \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 PHP"},"content":{"rendered":"<p>\u0412 jabber-\u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u044e \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u043b\u044e\u0434\u0438 \u0438 \u043e\u0447\u0435\u043d\u044c \u0447\u0430\u0441\u0442\u043e \u0441\u0442\u043e\u0438\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 &#8212; \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c LAMP, \u043d\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0430\u043a, \u0430 \u0435\u0449\u0435 \u0438 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c\u0438 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430\u043c\u0438, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043d\u0430 PHP \u043f\u0438\u0441\u0430\u0442\u044c.<br \/>\n\u0412\u0441\u0435 \u0443\u043f\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0432 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0434\u0440\u0435\u0432\u043d\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438, \u0433\u0434\u0435 \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u043d\u043e \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c SELinux.<br \/>\n\u042f \u043f\u0440\u043e\u0442\u0438\u0432, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u0432\u0441\u0435 \u044d\u0442\u043e \u043d\u0435 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u044f SELinux, \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0432 Fedora Linux.<br \/>\n<!--more--><\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/h3>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;width:560px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"text codecolorer\">yum install httpd mariadb-server php php-mysqlnd<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>\u0420\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e:<\/p>\n<ul>\n<li><strong>httpd<\/strong> &#8212; \u0441\u0430\u043c apache;<\/li>\n<li><strong>mariadb<\/strong> &#8212; \u044d\u0442\u043e \u0441\u0435\u0440\u0432\u0435\u0440 mysql;<\/li>\n<li><strong>php<\/strong> &#8212; \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u0430\u043c\u043e \u0437\u0430 \u0441\u0435\u0431\u044f \u0433\u043e\u0432\u043e\u0440\u0438\u0442;<\/li>\n<li><strong>php-mysqlnd<\/strong> &#8212; \u043c\u043e\u0434\u0443\u043b\u044c php \u0434\u043b\u044f mysql;<\/li>\n<\/ul>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 mysqld (mariadb)<\/h3>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440 (\u043e\u0442 <em>root<\/em>):<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;width:560px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"text codecolorer\">systemctl start mysqld<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>\u0430 \u0437\u0430\u0442\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043e\u0442 <em>root<\/em> \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440:<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;width:560px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"text codecolorer\">mysql_secure_installation<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p><em><strong>Enter current password for root (enter for none)<\/strong><\/em> &#8212; \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f root \u0438\u043b\u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 Enter, \u0435\u0441\u043b\u0438 \u043e\u043d \u043f\u0443\u0441\u0442\u043e\u0439.<br \/>\n\u041a\u043e\u043d\u0435\u0447\u043d\u043e \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c Enter, \u0443 \u043d\u0430\u0441 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0435\u0449\u0435 \u043f\u0430\u0440\u043e\u043b\u044c.<br \/>\n<em><strong>Set root password? [Y\/n]<\/strong><\/em><br \/>\n\u042f \u043e\u0442\u0432\u0435\u0447\u0430\u044e Y (\u0442.\u0435. \u0434\u0430) \u0438 \u0441\u0442\u0430\u0432\u043b\u044e \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043f\u0430\u0440\u043e\u043b\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f root.<br \/>\n<em><strong>Remove anonymous users? [Y\/n]<\/strong><\/em><br \/>\n\u0423\u0434\u0430\u043b\u044f\u0435\u043c \u0430\u043d\u043e\u043d\u0438\u043c\u0430? \u042f \u0443\u0434\u0430\u043b\u044f\u044e, \u0430 \u0437\u0430\u0447\u0435\u043c \u043c\u043d\u0435 \u0430\u043d\u043e\u043d\u0438\u043c\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \ud83d\ude42<br \/>\n<em><strong>Disallow root login remotely? [Y\/n]<\/strong><\/em><br \/>\n\u041e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c root&#8217;\u0443 \u0437\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u043f\u043e \u0441\u0435\u0442\u0438.<br \/>\n\u0415\u0441\u043b\u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u043c\u0430\u0448\u0438\u043d\u043a\u0435 \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u0430\u0440\u043d\u0438\u043a\u043e\u0432\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u0441\u0435\u0442\u0438, \u0442\u043e \u043d\u0435 \u0432\u0438\u0436\u0443 \u0441\u043c\u044b\u0441\u043b\u0430 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c &#171;\u0414\u0430&#187;.<br \/>\n\u0410 \u0432\u043e\u0442 \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0442\u044c vps\/vds, \u0442\u043e\u0433\u0434\u0430 \u0434\u0430, \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043d\u0430\u0434\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e.<br \/>\n<em><strong>Remove test database and access to it? [Y\/n]<\/strong><\/em><br \/>\n\u041e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043d\u0438\u043c. \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u043c.<br \/>\n<em><strong>Reload privilege tables now? [Y\/n]<\/strong><\/em><br \/>\n\u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u043f\u0440\u0438\u0432\u0435\u043b\u0435\u0433\u0438\u0439 \u0441\u0435\u0439\u0447\u0430\u0441. \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0434\u0430.<br \/>\n\u0422\u0430\u043a \u043c\u044b \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438 \u0432\u0432\u043e\u0434\u043d\u0443\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 mysql (mariadb).<\/p>\n<h3> httpd <\/h3>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c apache (\u043e\u0442 root):<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;width:560px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"text codecolorer\">systemctl start httpd<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<h3> \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c <\/h3>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443.<br \/>\n\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 apache+php:<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;width:560px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"text codecolorer\">echo &quot;&lt;?php phpinfo() ?&gt; &quot; &gt; \/var\/www\/html\/test.php<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0437\u0430\u0439\u0434\u044f \u0447\u0435\u0440\u0435\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440.<br \/>\n\u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440, \u0442\u043e \u0430\u0434\u0440\u0435\u0441 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a: <a href=\"http:\/\/localhost\/test.php\" target=\"_blank\">http:\/\/localhost\/test.php<\/a>.<br \/>\n\u0414\u043e\u043b\u0436\u043d\u0430 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0430 \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e PHP.<br \/>\n\u0427\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u044d\u0442\u043e\u0439:<br \/>\n<a href=\"http:\/\/elemc.name\/wp-content\/uploads\/2014\/02\/phpinfo.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"852\" data-permalink=\"https:\/\/elemc.name\/?attachment_id=852\" data-orig-file=\"https:\/\/elemc.name\/wp-content\/uploads\/2014\/02\/phpinfo.png\" data-orig-size=\"622,988\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"phpinfo\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/elemc.name\/wp-content\/uploads\/2014\/02\/phpinfo.png\" data-large-file=\"https:\/\/elemc.name\/wp-content\/uploads\/2014\/02\/phpinfo.png\" src=\"http:\/\/elemc.name\/wp-content\/uploads\/2014\/02\/phpinfo.png\" alt=\"phpinfo\" width=\"622\" height=\"988\" class=\"aligncenter size-full wp-image-852\" \/><\/a><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0442\u0430\u043a\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0438 \u043d\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c, \u0437\u043d\u0430\u0447\u0438\u0442 \u0447\u0442\u043e-\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b(\u0430) \u043d\u0435 \u0442\u0430\u043a. \u041d\u0430\u0434\u043e \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043b\u043e\u0433\u0438 \u0438 \u043b\u0435\u0447\u0438\u0442\u044c.<br \/>\n\u0412\u0441\u0435. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0443 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c &#171;\u0442\u0435\u043f\u043b\u044b\u0439 LAMP&#8217;\u043e\u0432\u044b\u0439&#187; \u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n<h3> \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0438 <\/h3>\n<p>\u0412 \u043f\u0430\u043a\u0435\u0442\u0435 <strong>httpd<\/strong> \u0443\u0436\u0435 \u0432\u0441\u0435 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043d\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0438.<br \/>\n\u041f\u0440\u043e\u0441\u0442\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u043c \u044d\u0442\u0443 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c.<\/p>\n<p>\u0412\u043e\u0442 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 <em>\/etc\/httpd\/conf.d\/userdir.conf<\/em>:<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;width:560px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/>13<br \/>14<br \/>15<br \/>16<br \/>17<br \/>18<br \/>19<br \/>20<br \/>21<br \/>22<br \/>23<br \/>24<br \/>25<br \/>26<br \/>27<br \/>28<br \/>29<br \/>30<br \/>31<br \/>32<br \/>33<br \/>34<br \/><\/div><\/td><td><div class=\"text codecolorer\"># UserDir: The name of the directory that is appended onto a user's home<br \/>\n# directory if a ~user request is received.<br \/>\n#<br \/>\n# The path to the end user account 'public_html' directory must be<br \/>\n# accessible to the webserver userid. &nbsp;This usually means that ~userid<br \/>\n# must have permissions of 711, ~userid\/public_html must have permissions<br \/>\n# of 755, and documents contained therein must be world-readable.<br \/>\n# Otherwise, the client will only receive a &quot;403 Forbidden&quot; message.<br \/>\n#<br \/>\n&lt;IfModule mod_userdir.c&gt;<br \/>\n&nbsp; &nbsp; #<br \/>\n&nbsp; &nbsp; # UserDir is disabled by default since it can confirm the presence<br \/>\n&nbsp; &nbsp; # of a username on the system (depending on home directory<br \/>\n&nbsp; &nbsp; # permissions).<br \/>\n&nbsp; &nbsp; #<br \/>\n&nbsp; &nbsp; UserDir disabled<br \/>\n<br \/>\n&nbsp; &nbsp; #<br \/>\n&nbsp; &nbsp; # To enable requests to \/~user\/ to serve the user's public_html<br \/>\n&nbsp; &nbsp; # directory, remove the &quot;UserDir disabled&quot; line above, and uncomment<br \/>\n&nbsp; &nbsp; # the following line instead:<br \/>\n&nbsp; &nbsp; #<br \/>\n&nbsp; &nbsp; #UserDir public_html<br \/>\n&lt;\/IfModule&gt;<br \/>\n<br \/>\n#<br \/>\n# Control access to UserDir directories. &nbsp;The following is an example<br \/>\n# for a site where these directories are restricted to read-only.<br \/>\n#<br \/>\n&lt;Directory &quot;\/home\/*\/public_html&quot;&gt;<br \/>\n&nbsp; &nbsp; AllowOverride FileInfo AuthConfig Limit Indexes<br \/>\n&nbsp; &nbsp; Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec<br \/>\n&nbsp; &nbsp; Require method GET POST OPTIONS<br \/>\n&lt;\/Directory&gt;<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>\u0415\u0441\u043b\u0438 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0447\u0438\u0442\u0430\u0442\u044c\u0441\u044f \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430, \u0442\u043e \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u0441\u0440\u0430\u0437\u0443.<br \/>\n\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 \u211616 &#8212; \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441\u0430\u043c\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 UserDir.<br \/>\n\u0423\u0431\u0438\u0440\u0430\u0435\u043c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 \u211623 &#8212; \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 &#171;\u0445\u043e\u043c\u044f\u043a\u0435&#187;.<br \/>\n\u0418 \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u211633 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0435\u0449\u0435 \u043e\u0434\u043d\u0443 \u0441\u0442\u0440\u043e\u0447\u043a\u0443:<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;width:560px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"text codecolorer\">Require all granted<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>\u041e\u043d\u0430 \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442 <strong>httpd<\/strong> &#171;\u043e\u0442\u0434\u0430\u0432\u0430\u0442\u044c&#187; \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c.<\/p>\n<p>\u0412 \u043e\u0431\u0449\u0435\u043c \u0438 \u0446\u0435\u043b\u043e\u043c \u0444\u0430\u0439\u043b \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u0441 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;width:560px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/>13<br \/>14<br \/>15<br \/>16<br \/>17<br \/>18<br \/>19<br \/>20<br \/>21<br \/>22<br \/>23<br \/>24<br \/>25<br \/>26<br \/>27<br \/>28<br \/>29<br \/>30<br \/>31<br \/>32<br \/>33<br \/>34<br \/>35<br \/><\/div><\/td><td><div class=\"text codecolorer\"># UserDir: The name of the directory that is appended onto a user's home<br \/>\n# directory if a ~user request is received.<br \/>\n#<br \/>\n# The path to the end user account 'public_html' directory must be<br \/>\n# accessible to the webserver userid. &nbsp;This usually means that ~userid<br \/>\n# must have permissions of 711, ~userid\/public_html must have permissions<br \/>\n# of 755, and documents contained therein must be world-readable.<br \/>\n# Otherwise, the client will only receive a &quot;403 Forbidden&quot; message.<br \/>\n#<br \/>\n&lt;IfModule mod_userdir.c&gt;<br \/>\n&nbsp; &nbsp; #<br \/>\n&nbsp; &nbsp; # UserDir is disabled by default since it can confirm the presence<br \/>\n&nbsp; &nbsp; # of a username on the system (depending on home directory<br \/>\n&nbsp; &nbsp; # permissions).<br \/>\n&nbsp; &nbsp; #<br \/>\n&nbsp; &nbsp; # UserDir disabled<br \/>\n<br \/>\n&nbsp; &nbsp; #<br \/>\n&nbsp; &nbsp; # To enable requests to \/~user\/ to serve the user's public_html<br \/>\n&nbsp; &nbsp; # directory, remove the &quot;UserDir disabled&quot; line above, and uncomment<br \/>\n&nbsp; &nbsp; # the following line instead:<br \/>\n&nbsp; &nbsp; #<br \/>\n&nbsp; &nbsp; UserDir public_html<br \/>\n&lt;\/IfModule&gt;<br \/>\n<br \/>\n#<br \/>\n# Control access to UserDir directories. &nbsp;The following is an example<br \/>\n# for a site where these directories are restricted to read-only.<br \/>\n#<br \/>\n&lt;Directory &quot;\/home\/*\/public_html&quot;&gt;<br \/>\n&nbsp; &nbsp; AllowOverride FileInfo AuthConfig Limit Indexes<br \/>\n&nbsp; &nbsp; Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec<br \/>\n&nbsp; &nbsp; Require method GET POST OPTIONS<br \/>\n&nbsp; &nbsp; Require all granted<br \/>\n&lt;\/Directory&gt;<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0444\u0430\u0439\u043b.<br \/>\n\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c <strong>httpd<\/strong> \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u043e\u0442 root&#8217;\u0430:<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;width:560px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"text codecolorer\">systemctl restart httpd<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p><strong>\u0421 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0434\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c\u0441\u044f, \u0447\u0442\u043e \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0437\u043e\u0432\u0443\u0442 <em>IMUSER<\/em>, \u043f\u0440\u043e\u0441\u0442\u043e \u043c\u0435\u043d\u044f\u0439\u0442\u0435 \u044d\u0442\u043e \u0441\u043b\u043e\u0432\u043e \u043d\u0430 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/strong><\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 (\u043a\u043e\u043d\u0435\u0447\u043d\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u043d\u0430\u0434\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f):<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;width:560px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"text codecolorer\">mkdir ~\/public_html<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u0439\u043c\u0435\u043c\u0441\u044f \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f\u043c\u0438.<br \/>\n\u0421\u043f\u0435\u0440\u0432\u0430 \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u043c \u0434\u0435\u043c\u043e\u043d\u0443 <strong>httpd<\/strong> \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u043e\u0442 root&#8217;\u0430):<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;width:560px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"text codecolorer\">chmod 711 \/home\/IMUSER<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>\u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0432\u043a\u043b\u044e\u0447\u0438\u0442 \u0444\u043b\u0430\u0433\u0438 &#171;x&#187; (\u0434\u043b\u044f \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432 \u044d\u0442\u043e \u0444\u043b\u0430\u0433 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430) \u0434\u043b\u044f \u0433\u0440\u0443\u043f\u043f\u044b \u0438 \u043f\u0440\u043e\u0447\u0438\u0445.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u043a\u043b\u044e\u0447\u0438\u043c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f SELinux (\u0442\u0430\u043a\u0436\u0435 \u043e\u0442 root&#8217;\u0430):<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;width:560px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"text codecolorer\">setsebool -P httpd_read_user_content=1 httpd_enable_homedirs=1<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>\u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442 \u0434\u0435\u043c\u043e\u043d\u0443 <strong>httpd<\/strong> \u0447\u0438\u0442\u0430\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430\u0445. \u0418 \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043d\u0438\u043c\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u0434\u043b\u044f <strong>httpd<\/strong>.<\/p>\n<p>\u041d\u0443 \u0438 \u0432 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 &#8212; \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432 \u0432\u0441\u0435 \u043d\u0430 \u0442\u043e\u043c \u0436\u0435 \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u043e\u043c \u0444\u0430\u0439\u043b\u0438\u043a\u0435.<br \/>\n\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f:<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;width:560px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"text codecolorer\">echo &quot;&lt;?php phpinfo() ?&gt; &quot; &gt; ~\/public_html\/test.php<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c.<br \/>\n\u041d\u0430\u043c \u043d\u0430\u0434\u043e \u0437\u0430\u0439\u0442\u0438 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443: http:\/\/localhost\/~IMUSER\/test.php<br \/>\n\u042f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u044e \u044d\u0442\u043e\u0442 \u0430\u0434\u0440\u0435\u0441 \u0441\u0441\u044b\u043b\u043a\u043e\u0439. \u041f\u043e\u043c\u043d\u0438\u0448\u044c \u0435\u0449\u0435 \u043e \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u0438? \ud83d\ude09<\/p>\n<h3> \u041d\u0430\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u043a <\/h3>\n<p>\u0422\u0443\u0442 \u044f \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e \u0442\u043e, \u0447\u0442\u043e \u043d\u0435 \u0432\u043e\u0448\u043b\u043e \u0432 \u0442\u0435\u043a\u0441\u0442 \u0441\u0442\u0430\u0442\u044c\u0438, \u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043c\u043e\u0447\u044c.<\/p>\n<p>\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a \u0441\u043b\u0443\u0436\u0431 httpd \u0438 mariadb (mysql):<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;width:560px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"text codecolorer\">systemctl enable httpd mariadb<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>SELinux&#8217;\u0443 \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f httpd \u0441 \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u0441\u0435\u0442\u0438 (\u043c\u043e\u0436\u043d\u043e \u0435\u0449\u0435 \u0447\u0435\u0440\u0435\u0437 \u0441\u043e\u043a\u0435\u0442, \u044d\u0442\u043e SELinux \u043d\u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u0442).<br \/>\n&#171;\u041b\u0435\u0447\u0438\u0442\u0441\u044f&#187; \u044d\u0442\u043e \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0444\u043b\u0430\u0436\u043a\u0430 SELinux (\u043e\u0442 root&#8217;\u0430):<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;width:560px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"text codecolorer\">setsebool -P httpd_can_network_connect_db=1<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>\u041e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u0432 <em>man<\/em>-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0445:<br \/>\nman httpd_selinux<br \/>\nman mysqld_selinux<br \/>\n\u041d\u0430\u0434\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0430\u043a\u0435\u0442 <strong><em>selinux-policy-devel<\/em><\/strong><\/p>\n<p>\u042f \u0431\u0443\u0434\u0443 \u0440\u0430\u0434 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0438\/\u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e.<br \/>\n\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438, \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430, \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442\u0441\u044f.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412 jabber-\u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u044e \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u043b\u044e\u0434\u0438 \u0438 \u043e\u0447\u0435\u043d\u044c \u0447\u0430\u0441\u0442\u043e \u0441\u0442\u043e\u0438\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 &#8212; \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c LAMP, \u043d\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0430\u043a, \u0430 \u0435\u0449\u0435 \u0438 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c\u0438 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430\u043c\u0438, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043d\u0430 PHP \u043f\u0438\u0441\u0430\u0442\u044c. \u0412\u0441\u0435 \u0443\u043f\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0432 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0434\u0440\u0435\u0432\u043d\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438, \u0433\u0434\u0435 \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u043d\u043e \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c SELinux. \u042f \u043f\u0440\u043e\u0442\u0438\u0432, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u0432\u0441\u0435 \u044d\u0442\u043e \u043d\u0435 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u044f SELinux, \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0432 Fedora [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":9,"menu_order":1,"comment_status":"open","ping_status":"open","template":"","meta":{"jetpack_post_was_ever_published":false,"footnotes":""},"jetpack_shortlink":"https:\/\/wp.me\/P1TKY7-dy","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/elemc.name\/index.php?rest_route=\/wp\/v2\/pages\/840"}],"collection":[{"href":"https:\/\/elemc.name\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/elemc.name\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/elemc.name\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/elemc.name\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=840"}],"version-history":[{"count":25,"href":"https:\/\/elemc.name\/index.php?rest_route=\/wp\/v2\/pages\/840\/revisions"}],"predecessor-version":[{"id":1001,"href":"https:\/\/elemc.name\/index.php?rest_route=\/wp\/v2\/pages\/840\/revisions\/1001"}],"up":[{"embeddable":true,"href":"https:\/\/elemc.name\/index.php?rest_route=\/wp\/v2\/pages\/9"}],"wp:attachment":[{"href":"https:\/\/elemc.name\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=840"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}