Page 1 of 1


Posted: 2015/04/01 21:28:52
by didko6
Hello guys,

i have one simple question, i am still a newbie in linux. I am using centos5, i have installed apache, uploaded my website to var/www/html ...My questions is how to give access or deny access to urls. For example if my website is, i want to give access to only for 1 or 2 IPs (example is in folder var/www/html/example).
I read in the forums that i have to use : vi /etc/httpd/conf/httpd.conf after that i have to locate the folder. I have no idea whats next i dont know how exactly to locate the folder when im in vi /etc/httpd/conf/httpd.conf . I know how to locate folders with cd but i dont think i need that. after vi /etc/httpd/conf/httpd.conf i hit shift+g so i get
<VirtualHost *:80>
# ServerAdmin
# DocumentRoot /www/docs/
# ServerName
# ErrorLog logs/
# CustomLog logs/ common
as last line. Please advice, do i have to insert:

<Directory /var/www/html/example>
Order allow,deny
Allow from my ip
Allow from 127

Thank you in advance!

Re: permissions

Posted: 2015/04/02 15:46:21
by aks
Order deny,allow
Deny from all
Allow from <my-ip>