linux_wiki:configure_access_restrictions_on_directories

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:configure_access_restrictions_on_directories [2018/04/07 23:50]
billdozor [Restrict Access]
linux_wiki:configure_access_restrictions_on_directories [2019/05/25 23:50] (current)
Line 12: Line 12:
   * server1.example.com (192.168.1.150) -> Perform all connectivity tests from here   * server1.example.com (192.168.1.150) -> Perform all connectivity tests from here
   * server2.example.com (192.168.1.151) -> Install Apache Web Server here   * server2.example.com (192.168.1.151) -> Install Apache Web Server here
 +
 +**Previous Sections Completed**
 +  * [[linux_wiki:network_services_overview_apache_web_server|Install/Configure]]
 +    * Except leave listening on port 80/tcp
 +  * [[linux_wiki:configure_a_virtual_host|Virtual Host Config]]
  
 ---- ----
Line 98: Line 103:
 ===== Restrict Access ===== ===== Restrict Access =====
  
 +**Help**: Available if you installed 'httpd-manual'<code bash>elinks /usr/share/httpd/manual/howto/auth.html</code>
 +
 +\\
 +Create password for the user
 +<code bash>
 +htpasswd -c /etc/httpd/conf/userdb user1
 +</code>
 +  * Prompted for a password
 +
 +\\
 Edit the vhosts.conf file and add this additional Directory part in the redsite virtualhost Edit the vhosts.conf file and add this additional Directory part in the redsite virtualhost
 <code bash>vim /etc/httpd/conf.d/vhosts.conf <code bash>vim /etc/httpd/conf.d/vhosts.conf
Line 109: Line 124:
     AuthType Basic     AuthType Basic
     AuthName "Restricted Area"     AuthName "Restricted Area"
-    AuthUserFile "/etc/httpd/conf/usersdb"+    AuthUserFile "/etc/httpd/conf/userdb"
     Require valid-user     Require valid-user
   </Directory>   </Directory>
 </VirtualHost> </VirtualHost>
 </code> </code>
- 
-\\ 
-Create password for the user 
-<code bash> 
-htpasswd -c /etc/httpd/conf/usersdb user1 
-</code> 
-  * Prompted for a password 
  
 \\ \\
  • linux_wiki/configure_access_restrictions_on_directories.1523159432.txt.gz
  • Last modified: 2019/05/25 23:50
  • (external edit)