LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 11-20-2012, 11:29 AM   #1
Vimuth
Member
 
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.

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

Rep: Reputation: Disabled
You can create link
Code:
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
Code:
seq 1000 > /var/ftp/pub/RHEL6_X86_64/1k.txt
if required restart the http service, but not necessary.
Code:
/sbin/service httpd restart
Now you will be able to access from browser.
Code:
http://http_server_ip/RHEL/1k.txt
ftp://ftp_server_ip/pub/RHEL6_X86_64/1k.txt

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

Last edited by mandyapenguin; 11-20-2012 at 12:55 PM.
 
1 members found this post helpful.
Old 11-20-2012, 03:15 PM   #3
larvel
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.
 
  


Reply



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 02:38 PM
how to tell yum not to update repo megerdin Linux - Newbie 4 11-26-2009 02:38 AM
some yum repo help please cwc Fedora 6 09-24-2009 07: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 07:28 AM
adding mirror to yum.repo.d/<any-repo> ashwin_cse Fedora 1 03-10-2005 03:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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