Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-20-2012, 12:29 PM   #1
Registered: Sep 2009
Posts: 59

Rep: Reputation: 15
yum repo

Hello good people.

I have a RHEL6 repo setup that can be acceeed succefully by all hosts in the n/w via ftp.
I would like to make this repo which is located in /var/ftp/pub/RHEL6_X86_64 available via apache too for a perticular host. How do I go about doing it without changing the location of repo files mentioned above? As in without creating the repo under a */html directory.

Please note that I dhave the very deafualt configuration on httpd, nothing has changed. is this something to be done via a virtualhosts? if that is the case or some other please can you mention of an example?

Many thanks in advance.

Old 11-20-2012, 01:38 PM   #2
Registered: Nov 2011
Location: India
Distribution: RedHat, Cent OS, Fedora, Debian, Ubuntu
Posts: 106

Rep: Reputation: Disabled
You can create link
ln -s /var/ftp/pub/RHEL6_X86_64 /var/www/html/RHEL
Now you will be able to access it and also new files that you put into /var/ftp/pub/RHEL6_X86_64 directory using http if http service is running, using http://http_server_ip/RHEL
For testing just create a test file
seq 1000 > /var/ftp/pub/RHEL6_X86_64/1k.txt
if required restart the http service, but not necessary.
/sbin/service httpd restart
Now you will be able to access from browser.

To Block particular host
iptables -I INPUT 1 -s ip_address -p tcp --dport 80 -j DROP
Or for example to reject
iptables -I INPUT 1 -s -p tcp --dport 80 -j REJECT
To allow particular host
iptables -I INPUT 1 -s ip_address -p tcp --dport 80 -j ACCEPT

Last edited by mandyapenguin; 11-20-2012 at 01:55 PM.
1 members found this post helpful.
Old 11-20-2012, 04:15 PM   #3
LQ Newbie
Registered: Jun 2012
Posts: 29

Rep: Reputation: Disabled
You most never have to restart apache. Simply service httpd reload. Also in my opinion Its better to use allow deny directive instead of iptables.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Yum repo not updating? lce411 Linux - Server 2 10-25-2012 03:38 PM
how to tell yum not to update repo megerdin Linux - Newbie 4 11-26-2009 03:38 AM
some yum repo help please cwc Fedora 6 09-24-2009 08:35 PM
yum.conf - extract files from a DVD. How define repo location and what is yum command emuub Linux - Software 2 06-17-2007 08:28 AM
adding mirror to yum.repo.d/<any-repo> ashwin_cse Fedora 1 03-10-2005 04:49 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:36 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration