LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   yum configuration in http server (https://www.linuxquestions.org/questions/linux-server-73/yum-configuration-in-http-server-909097/)

deep27ak 10-20-2011 12:23 AM

yum configuration in http server
 
Hello all,

I already have a yum configured in my machine(RHEL 5.2) in which the baseurl points to the file where repository is created.
But now I want to configure a http server where I can save all the packages and manually check for all RPMs on the browser
and I want to use that particular http link in my baseurl for yum configuration

Well I started with the initial steps i.e
I want this directory
Code:

(/sdb1/www/yum)
to be default instead of
Code:

/var/www/html
Please let me know all the places where I need to make changes for this

Code:

#cd /sdb1/www/yum
(here sdb1 is a folder)

Code:

#cp /mnt/RHEL_5/Server/* .
#cd ..
#createrepo yum/

Code:

#vi /etc/httpd/conf/httpd.conf
<VirtualHost 192.168.0.106:80>
        ServerAdmin root@server.deepsoft.com
        ServerName server.deepsoft.com
        DocumentRoot /sdb1/www/yum/
        <Directory /sdb1/www/yum/>
        Order allow,deny
        Allow from all
        </Directory>
</VirtualHost>

Code:

#service httpd restart
I don't know where I am going wrong
But when I go to browser to check for apache configuration
but it returns with "page not found error"

Can anyonly help me with this apache configuration please

pantdk 10-20-2011 12:51 AM

HI

Check out this you have miss
Options Indexes put that & resolve your prob

<Directory /sdb1/www/yum/>
Options Indexes
Order allow,deny
Allow from all
</Directory>
</VirtualHost>


Thanks
dk

deep27ak 10-20-2011 01:05 AM

Quote:

Originally Posted by pantdk (Post 4503147)
HI

Check out this you have miss
Options Indexes put that & resolve your prob

<Directory /sdb1/www/yum/>
Options Indexes
Order allow,deny
Allow from all
</Directory>
</VirtualHost>


Thanks
dk


Nope, It is still not working
I get an error of Page not found

deep27ak 10-20-2011 02:08 AM

This is a small update

I gave the
Code:

baseurl=http://192.168.0.106/
and my yum is working properly

But I don't see any RPMs on browser
How do I configure my httpd.conf so that I can see all the listed rpms inside

Code:

/sdb1/www/yum/
is it possible?

pantdk 10-20-2011 07:42 AM

1 Attachment(s)
Attachment 8212

check out as you say that i did't wk so i made same environment & found it work. check your conf

<VirtualHost 192.168.45.100:80>
ServerAdmin root@deepak.example.com
ServerName deepak.example.com
DocumentRoot /sdb1/www/
<Directory /sdb1/www/>
Options Indexes
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

in client machine add in hosts file
192.168.45.100 deepak.example.com

put you all doc or rpm in yum directory that will listed in browser or make changes which directory
you want to list

Thanks
DK

deep27ak 10-20-2011 08:17 AM

thanx buddy

I was about to ask you a question

You have mentioned a different directory in your httpd.conf file
Code:

DocumentRoot /sdb1/www/
<Directory /sdb1/www/>

and the browser address is different
Code:

192.168.45.100/yum
but then something crossed my mind
I had forgot to mention the Alias name in httpd.conf

This is for all other users who might face this issue in future
Code:

<VirtualHost 192.168.0.106:80>
        ServerAdmin root@server.deepsoft.com
        ServerName server.deepsoft.com
        DocumentRoot /sdb1/www/yum/
        <Directory /sdb1/www/yum/>
        Options Indexes
        Order allow,deny
        Allow from all
        </Directory>
</VirtualHost>

Alias /yum  /sdb1/www/yum
<Directory /sdb1/www/yum/>
        AllowOverride None
        Options None
        Order allow,deny
        Allow from all
</Directory>

Thanks again:hattip:

gardenair 11-17-2011 06:42 AM

Need to learn apache first.
 
Regarding to APACHE server just think i am doing it first time .
Things i know about apache is that it has two types.
1-IP based Virtual Hosting
In IP Based virtualk hosting every web site has different IP address & its name should be also different.


2- Name Based Virtual Hosting
In it we have only only one IP address but we can host many web sites on it.In apachi we use "Name Based Virtual Hosting".All ISPS'S IN THE WORLD USE THIS METHOD.

So now 1st i want to configure APACHE "IP based Virtual Hosting" then "Name Based Virtual Hosting" .
Do you know these two configurations.

I am not using DNS at the moment.For apache should i fist
configure DNS then install & configre APACHE,

thanks,
gardenair

deep27ak 11-17-2011 06:48 AM

You should start a new thread so that others can also help you as I have already marked the thread as solved.

and for your query, You need a DNS server but not required to manually configure any DNS server for APACHE.

You can always use Google where you can fine a bunch of tutorials regarding apache server

Best of luck.


All times are GMT -5. The time now is 03:00 PM.