CentOS7—Apache—多个虚拟站点—semodule

[root@localhost processmaker]# gedit /etc/httpd/conf.d/root.conf            //内容如下

点击(此处)折叠或打开

  1. # NameVirtualHost *:8000
  2. Listen 8000
  3. <VirtualHost *:8000>
  4.     ServerName 127.0.0.1

  5.     DocumentRoot /var/www/html
  6.     DirectoryIndex index.html index.php

  7.     <Directory /var/www/html>
  8.         Options Indexes FollowSymLinks MultiViews
  9.         AllowOverride None
  10.         Order allow,deny
  11.         allow from all

  12.         ExpiresActive On

  13.         <IfModule mod_rewrite.c>
  14.             RewriteEngine On
  15.             RewriteCond %{REQUEST_FILENAME} !-f
  16.             RewriteRule ^.*/(.*)$ app.php [QSA,L,NC]
  17.         </IfModule>
  18.     </Directory>
  19. </VirtualHost>

[root@localhost processmaker]# gedit /etc/httpd/conf.d/pmos.conf            //内容如下

点击(此处)折叠或打开

  1. <VirtualHost *:80>
  2.     ServerName 127.0.0.1

  3.     DocumentRoot /var/www/html/processmaker/workflow/public_html
  4.     DirectoryIndex index.html index.php

  5.     <Directory /var/www/html/processmaker/workflow/public_html>
  6.         Options Indexes FollowSymLinks MultiViews
  7.         AllowOverride None
  8.         Order allow,deny
  9.         allow from all

  10.         ExpiresActive On

  11.         <IfModule mod_rewrite.c>
  12.             RewriteEngine On
  13.             RewriteCond %{REQUEST_FILENAME} !-f
  14.             RewriteRule ^.*/(.*)$ app.php [QSA,L,NC]
  15.         </IfModule>
  16.     </Directory>
  17. </VirtualHost>

[root@localhost processmaker]# systemctl restart httpd

Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details.

[root@localhost processmaker]# journalctl -xn

11月 04 23:29:55 localhost.localdomain setroubleshoot[17685]: load_plugins() plugins.xen_image previously imported
11月 04 23:29:55 localhost.localdomain python[17685]: SELinux is preventing /usr/sbin/httpd from name_bind access on the tcp_socket por
              
              *****  Plugin catchall (100. confidence) suggests   **************************
              
              If you believe that httpd should be allowed name_bind access on the port 8000 tc
              Then you should report this as a bug.
              You can generate a local policy module to allow this access.
              Do
              allow this access for now by executing:
              # grep httpd /var/log/audit/audit.log | audit2allow -M mypol
              # semodule -i mypol.pp

[root@localhost processmaker]# semodule -i mypol.pp
[root@localhost processmaker]# systemctl restart httpd
[root@localhost processmaker]#


posted @ 2016-02-01 00:00  张同光  阅读(88)  评论(0编辑  收藏  举报