I only want to show the content for myself, how do I configure the apache?
I'm using proxy to visit the site.
I can't do it with iptables for priviledge reasons..
I only want to show the content for myself, how do I configure the apache?
I'm using proxy to visit the site.
I can't do it with iptables for priviledge reasons..
This will prevent access from all addresses other than the one specified. Place it in your
<VirtualHost>
block, or.htaccess
file, or a<Directory>
or<Location>
block - whatever fits your needs.Do you have access permission on the proxy? If so, enable
X-FORWARDED-FOR
and configure Apache like belows:You can use mod_rewrite to do this:
See this link : http://httpd.apache.org/docs/2.0/howto/auth.html - and use any of the two methods you would like. Or even both.
Given that you are behind a proxy it may be easier to just password protect your site.
Create a file called
.htaccess
in yourDocumentRoot
directory then add this (if it already exists then just add to it)change /path/to above to something that suits you.
then create the file /path/to/.htpasswd and add a username and password
this will create the file and add a username
user
and ask for the password. Now your website is password protected.