Changes

Jump to navigation Jump to search
566 bytes added ,  16:01, 11 October 2014
→‎Restrict access to backend: - Edited to use custom template fragment
Line 76: Line 76:     
====Restrict access to backend====
 
====Restrict access to backend====
I wanted to restrict access to the administration backend to my LAN, so an outside user couldn't even get to the login page.  To do this, I created an .htaccess file like this:
+
I wanted to restrict access to the administration backend to my LAN, so an outside user couldn't even get to the login page.  To do this, I created a custom template fragment:
   −
  [root@e-smith html]# '''nano administrator/.htaccess'''
+
  [root@e-smith ~]# '''mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf'''
 +
[root@e-smith ~]# '''cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf'''
 +
[root@e-smith httpd.conf]# '''nano -w 92Joomla'''
    
The contents of the file look like this:
 
The contents of the file look like this:
    +
<Directory /home/e-smith/files/ibays/'''joomla'''/html>
 
  Order Deny,Allow
 
  Order Deny,Allow
 
  Deny from all
 
  Deny from all
 
  Allow from 192.168.x.0/24
 
  Allow from 192.168.x.0/24
 +
</Directory>
 +
 +
You'll need to change the directory name to reflect your ibay name.  Then, expand the template and restart Apache:
 +
 +
[root@e-smith httpd.conf]# '''expand-template /etc/httpd/conf/httpd.conf'''
 +
[root@e-smith httpd.conf]# '''service httpd-e-smith restart'''
 +
Restarting httpd-e-smith                                  [  OK  ]
    
====Enable two-factor authentication====
 
====Enable two-factor authentication====
147

edits

Navigation menu