permissions

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

permissions

Post by 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 facebook.com, i want to give access to facebook.com/example 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 webmaster@dummy-host.example.com
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log 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
</Directory>

Thank you in advance!

aks
Posts: 2526
Joined: 2014/09/20 11:22:14

Re: permissions

Post by aks » 2015/04/02 15:46:21

Order deny,allow
Deny from all
Allow from <my-ip>
See http://httpd.apache.org/docs/2.2/howto/access.html

Post Reply