Support for webhosts that use CentOS
Posts: 3
Joined: 2015/04/01 21:16:52


Postby didko6 » 2015/04/01 21:28:52

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!

Posts: 2509
Joined: 2014/09/20 11:22:14

Re: permissions

Postby aks » 2015/04/02 15:46:21

Order deny,allow
Deny from all
Allow from <my-ip>