View Full Version : from win2k to red ^ 8 ...... SOS
M.Ansary
Dear all , i'm new to redhat from the stupid windows 2000 server
to install a new site on iis :
1. add the IP from the : local area connection > properties > advanced > add > then type the new IP
2. go to the IIS add new web site > determine the ip , location on hard , some other options et VOILA , finito.
how can i do this in red hat ?
the main problems are :
1. i cant add a new ip
2. i cant configure the firewall settings correctly
3. i cant deal with apache
:( would any one help please ?
or tl me a location for a good tutorial liek this :
http://www.linux-egypt.org/showthread.php?s=&threadid=766
thnx 4 all
linuxawy1980
http://httpd.apache.org/docs-2.0/invoking.html
check this page :)
habdin
Salamo 3alaikom,
I might not be a networking guru but I want to ask about things for clarification since your post was vague to me.
First, do you want to setup a web server or what?
Second, do you a NIC on the machine you are trying to setup the probably supposed web server or not?
Please clarify things more. Thanks.
Salam.
M.Ansary
dear linuxawy1980, THNX for helping , BUT ... this article is the next step , elmoseba enny mish 3aref el 1st step :(.
and for dear habdin, THNX for interesting, i'll xpln stuff more :
i'm wrking as a senior web developer in an ISP , i got a new task i.e. to install and examine a new server rather than the buggy win-toz and its dummy ii-ekh (iis)
i'v circling around my self for about a month or so moving from Linux flavor to another, the first decision was : Apache as a web server BUT ... when i add a new site like www.site.com it should be conjugated to an IP in the DNS (this is done by the main server admin), i should tell the web server that (this site www.site.com is conjugated to this IP xxx.xxx....) , wahona marbatolfaras, Mr. linuxawy1980 hyya de el 1st step.
ya3ny bel3araby : 3ayez a add web site 3ala redhat from a-z.
(ip - firewall settings to open port 80 - link the site to its ip - shall i restart the apache or not).
linuxawy1980
ok now i understand and this is what you need to do
so what you want to find is somthing like the iis administration panel and it's unfortunately not a tool its a file.......
called httpd.conf it manages everything you need
check this example of it
http://www.magiccookie.com/computers/apache-jserv/conf/httpd.conf.txt
:D
i think it does every thing you want
waiting for what you did .........:)
mohamed
As someone dealing with servers day and night, I wish to be able to help.
Well;
I see you are thinking in the HTTP1.0 method.
Now you don't need an IP for each site, ripe guys will hate you if you do so... www.ripe.net
So, you should give all sites hosted on a machine, the same IP, that the machine has (I mean the public IP, not the private one, if any)
The idea is, the webserver should be able to extract the information about the site you want to visit from the request that the browser sends.
Now, you need to tell the DNS server to point to the IP, say 200.200.200.200 (example IP)
so;
Our server got the IP 200.200.200.200
In the DNS:
desoky.com will point to 200.200.200.200
ansary.com will point to 200.200.200.200
habdin.com will point to 200.200.200.200
....etc
In apache configuration file (/etc/httpd/conf/httpd.conf in redhat)
Do the following for each site.
<VirtualHost 200.200.200.200>
ServerAdmin webmaster@ansary.com
DocumentRoot /var/www/html/ansary.com
ServerName ansary.com
ErrorLog logs/ansary.com-error_log
CustomLog logs/ansary.com-access_log common
</VirtualHost>
This is for the host (site) ansary.com
Do the same for each site you want to host on that server
Of course you have to read the apache docs to know how to do more tweaks.
linuxawy1980
oh and i forgot
to manage virtual hosts you need this file
host.conf
and thats a nice sample toooo
http://www.magiccookie.com/computers/apache-jserv/conf/host.conf.txt
M.Ansary
stl slight details , can u ms me on 0101618305 , and i'll call u ?
or msg me on MSN - cykltron@hotmail.com , i'm online now
very many much more multi-thnx
waiting .............
M.Ansary
you guys were very helpful , you owe me a favor
sattia
ansary I think Im not going to add too much to what aratux and linuxawy said but I need to provide u with best practices.
First Apache has three modes for serving hosted web sites: IP-based which as aratux told wastes our precious IPs and makes ripe upset, Name-based in which all the hosts or websites share the same IP, and the mod_vhost_alias which is used for mass hosting and I think it is not ur case.
Apache configuration file is composed of some directives which u can read about'em here
http://httpd.apache.org/docs-2.0/mod/directives.html
For name-based to work u ve to type NameVirtualHost <Type IP here> directive in the server section in ur httpd.conf file otherwise it will be effective only for the directive it was type inside it.
Note that the server section is any where in the httpd.conf file outside any <VirtualHost>, <Location>, <Directory>,...etc directives to be effective for the whole server configuration.
As a best practice also type 'Options none' in the server section of ur httpd.conf file and enable only the options u need as per virtual host section.
Do no forget to make the appropiate permissions or ull simply get the Forbidden error.
Also do not forget to specify ur Document Index in order no to get the Forbidden error. Also u can specify it in server or per host configuration.
I forgot to tell u that any modification to the httpd.conf wont take effect untill u reload Apache. You can reload Apache in either of two ways:
1 - /etc/init.d/httpd restart
2 - kill -HUP `cat /var/run/httpd.pid`
the first way terminates apache and then runs it again. u may loose connections made to ur web server or interrupt downloads.
the second way is prefered as it tells apache to re-read the new configuration and do not interrupt any running connection.
I hope this would help and do not hesitate to come back but after u fail to do it urself.
Regards
mohamed
kill -HUP `cat /var/run/httpd.pid`
Just small note:
This ` is called back tick, you will find it to the left of the button with the number (1) + SHIFT
Regards
Mohamed Eldesoky
linuxawy1980
welcome ya basha
if you need any help just ask we are all here :)
RedHat
Just a quick notes over here ...
1- All the services in Red Hat are managed
now with:
service service_name start/stop/status
You shoudl be able to do start httpd by:
service httpd start
2- To make sure it will restart when you reboot
chkconfig httpd on
3- To Check when it is on or off
chkconfig httpd --list
this will show you which run levels it is
on/off
I guess the other stuff about apache and configuration are covered :)
vBulletin v3.0.1, Copyright ©2000-2004, Jelsoft Enterprises Ltd.