linux_wiki:network_services_overview_apache_web_server

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux_wiki:network_services_overview_apache_web_server [2018/04/07 16:59]
billdozor [Host Based]
linux_wiki:network_services_overview_apache_web_server [2019/05/25 23:50] (current)
Line 44: Line 44:
  
   * Service agnostic -> [[linux_wiki:set_enforcing_and_permissive_modes_for_selinux|Ensure SELinux is running and enabled (RHCSA objective)]].   * Service agnostic -> [[linux_wiki:set_enforcing_and_permissive_modes_for_selinux|Ensure SELinux is running and enabled (RHCSA objective)]].
 +  * **IMPORTANT**: View all label types<code bash># Install package
 +yum install setools-console
 +
 +# View all label types
 +seinfo -t
 +
 +# Find Apache types
 +seinfo -t | grep httpd
 +</code>
  
 ---- ----
Line 132: Line 141:
 Allow access through the firewall Allow access through the firewall
 <code bash> <code bash>
 +# Standard http/https ports
 firewall-cmd --permanent --add-service=http firewall-cmd --permanent --add-service=http
 firewall-cmd --permanent --add-service=https firewall-cmd --permanent --add-service=https
 +firewall-cmd --reload
 +
 +# Non-standard port example
 +firewall-cmd --permanent --add-port=8282/tcp
 firewall-cmd --reload firewall-cmd --reload
 </code> </code>
Line 143: Line 157:
 <Directory "/var/www/html"> <Directory "/var/www/html">
      
-  # Blacklist "evilserver.local"+  # Blacklist "server1"
   <RequireAll>   <RequireAll>
     Require all granted     Require all granted
-    Require not host evilserver.local+    Require not host server1
   </RequireAll>   </RequireAll>
      
 </Directory> </Directory>
 </code> </code>
-  * The above will allow access from all hosts except "evilserver.local"+  * The above will allow access from all hosts except "server1"
   * Must be inside of a <Directory> context.   * Must be inside of a <Directory> context.
  
  • linux_wiki/network_services_overview_apache_web_server.1523134774.txt.gz
  • Last modified: 2019/05/25 23:50
  • (external edit)