IP Based Authorization on Apache With NGINX Proxy
In the nginx config add: proxy_set_header X-Real-IP $remote_addr; In the apache config add: SetEnvIf X-Real-IP 72.3.230.* is_admin=true Allow from env=is_admin
In the nginx config add: proxy_set_header X-Real-IP $remote_addr; In the apache config add: SetEnvIf X-Real-IP 72.3.230.* is_admin=true Allow from env=is_admin
Create a .htaccsss file containing the following lines:
|
1 2 3 |
RemoveHandler .html .htm AddType application/x-httpd-php .php .htm .html |
Create a file at /etc/httpd/conf.d/no-etags.conf with the following: Header unset ETag FileETag None Then of course restart Apache. Here’s a discussion on why you may want to turn ETags off: http://www.askapache.com/htaccess/apache-speed-etags.html
It is of course a bad idea to write code that depends on register_globals for security reason, but sometimes when faced with old code it’s a necessary evil. You can turn on register_globals for a site or directory by adding the following line to your .htaccess file:
|
1 2 |
php_flag register_globals on |
Assume that you have a folder that is restricted by HTTP Basic Auth but you want to allow access to a sub-folder. Here’s how:
|
1 2 3 4 |
<Directory /var/www/vhosts/domain.com/httpdocs/myfolder > Satisfy Any Allow from all </Directory> |
Reliable Penguin provides managed web hosting, systems administration, website and server migrations, and expert consulting.
Submit the form—or for immediate service call 866-649-7984.