This is a discussion on Apache Config. within the Apache Web Server forums, part of the Web Server and Related Forums category; Good Afternoon, I am a newbie to linux and apache and would like to ask a few questions about configuring ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Good Afternoon,
I am a newbie to linux and apache and would like to ask a few questions about configuring a Mandriva 2007 web server. I am wanting to test out using a home/office based web server to host a couple of test websites to start with and then if it is successful I would like to host my 6 business websites on it. I have got some advice on how to install linux as a server but I have questions about the setting up of the 'host name', 'dns', 'ip', 'netmask' and 'gateway'. 1st. As I understand it the 'hostname' should be "server1.(mydomainname) (suffix)" is that correct? 2nd. The 'ip' address in the tutorial I found says to enter "192.168.0.100" is this also correct? 3rd. It says the 'gateway' should be "192.168.0.1" is this correct? 4th. It says the 'netmask' should be "255.255.255.0" is this correct? 5th. It says the settings for 'dns1' & 'dns2' should be "145.253.2.75" & "193.174.32.18" is this correct, if not what determinds these settings. Any help or advice would be greatly appreciated, Many thanks. Edd. |
|
|||
|
Davide Bianchi wrote:
> On 2006-12-11, Edd Smith <eddysmithuk@gmail.com> wrote: >> as a server but I have questions about the setting up of the 'host >> name', 'dns', 'ip', 'netmask' and 'gateway'. > > These have nothing to do with the setup of Apache, you'd better post > in some linux related group, but before, I suggest you read some > documentation about Linux and networking. > > Davide > Ahh, in the linux related group I was told to post to the apache group about these settings. |
|
|||
|
Edd,
I sent this to you direct because I did not see a post about it in Mandriva or Mandrake newsgroup. Edd Smith wrote: > Good Afternoon, > > I am a newbie to linux and apache and would like to ask a few questions > about configuring a Mandriva 2007 web server. I am wanting to > test out using a home/office based web server to host a couple of test > websites to start with and then if it is successful I would like to host my > 6 business websites on it. I have got some advice on how to install linux > as a server but I have questions about the setting up of the 'host > name', 'dns', 'ip', 'netmask' and 'gateway'. > > 1st. As I understand it the 'hostname' should be "server1.(mydomainname) > (suffix)" is that correct? Yes > > 2nd. The 'ip' address in the tutorial I found says to > enter "192.168.0.100" is this also correct? This depends on just how you have your computer already setup. When one usually installs Mandriva it uses DHCP to setup the networking for the machine. (192.168.1.0 - 192.168.1.255) this address range is a private set of IP's and are not accessible on the web in general. > > 3rd. It says the 'gateway' should be "192.168.0.1" is this correct? If Mandriva is using DHCP it should be 192.168.1.1 This is the way Mandriva normally sets up the network automatically. > > 4th. It says the 'netmask' should be "255.255.255.0" is this correct? In this case this is the correct netmask using the 192.168.1.xx range also > > 5th. It says the settings for 'dns1' & 'dns2' should be "145.253.2.75" > & "193.174.32.18" is this correct, if not what determinds these settings. Mandrive will setup these during the installation phase. They will be the dns servers of your isp. The are chosen automatically using DHCP If you have installed Apache it should already work using the default DHCP settings. The best way to check if it is indeed working is to open your favorite web browser and type in the following http://localhost if apache is running and working it will return some sort of default page. Another way to check is from a command window type at the prompt /sbin/ifconfig you should get something like below [dwmoar@bigdaddy ~]$ /sbin/ifconfig eth0 Link encap:Ethernet HWaddr 00:50:8D:D1:FD:1B inet addr:192.168.1.25 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:773645 errors:0 dropped:0 overruns:0 frame:0 TX packets:440722 errors:479 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1098692831 (1047.7 Mb) TX bytes:32637569 (31.1 Mb) Interrupt:19 Base address:0xa000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:68 errors:0 dropped:0 overruns:0 frame:0 TX packets:68 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:3692 (3.6 Kb) TX bytes:3692 (3.6 Kb) [dwmoar@bigdaddy ~]$ using information from eth0 above find the inet addr: information on the second line. That is the ip address assigned from DHCP in my case above it is 192.168.1.25 (yours might be different) Now using that ip address, from your web browser enter that IP as the url http://that IP Address <--- NOTE do NOT use www otherwise it will most likely give you an error at this point. If everything is setup properly you will see some sort of a default web page sent by apache. Congratulations your web server is working. I believe that Mandrivs still uses the following path as the document root for Apache /var/www/html everything that you will see coming from apache at this point should be from that path. If you get to this point ok just drop me an email and I will help you from there. -David DM-WebDesigners.com PS remembers since you are using a private IP group your web page will not be viewable from the Internet. It will only be seen from any computer on your network, by using that IP address of the webserver. > > > Any help or advice would be greatly appreciated, > Many thanks. > > Edd. |
|
|||
|
I agree with much of this reply, but I have a different opinion on a few
things Much of that comes from learning on a much earlier distribution of linux "David" <youcantoo@findmoore.net> wrote in message news:-t2dnQmRc4gRLuDYnZ2dnUVZ_vWtnZ2d@centurytel.net... > Edd, > > I sent this to you direct because I did not see a post about it in > Mandriva or Mandrake newsgroup. > > Edd Smith wrote: >> Good Afternoon, >> >> I am a newbie to linux and apache and would like to ask a few questions >> about configuring a Mandriva 2007 web server. I am wanting to >> test out using a home/office based web server to host a couple of test >> websites to start with and then if it is successful I would like to host >> my >> 6 business websites on it. I have got some advice on how to install >> linux >> as a server but I have questions about the setting up of the 'host >> name', 'dns', 'ip', 'netmask' and 'gateway'. >> >> 1st. As I understand it the 'hostname' should be >> "server1.(mydomainname) >> (suffix)" is that correct? > > Yes > >> >> 2nd. The 'ip' address in the tutorial I found says to >> enter "192.168.0.100" is this also correct? > I like to use the addresses under 100 for statip IP, and then let the router assign dynamic IP from 100 and up When it is 'inside' the LAN it is 192.168.0.21. I like it static because it is easier to find from the other computers on the LAN > This depends on just how you have your computer already setup. When one > usually installs Mandriva it uses DHCP to setup the networking for the > machine. (192.168.1.0 - 192.168.1.255) this address range is a private > set of IP's and are not accessible on the web in general. > >> >> 3rd. It says the 'gateway' should be "192.168.0.1" is this correct? > > If Mandriva is using DHCP it should be 192.168.1.1 This is the way > Mandriva normally sets up the network automatically. When I was using a coyote linux router years ago it wanted to be192.168.0.1, so I have stuck with that. I have always had '0' as the third digit, so netmask is 255.255.255.0 > > >> >> 4th. It says the 'netmask' should be "255.255.255.0" is this correct? > > In this case this is the correct netmask using the 192.168.1.xx range > also > >> >> 5th. It says the settings for 'dns1' & 'dns2' should be "145.253.2.75" >> & "193.174.32.18" is this correct, if not what determinds these settings. If you use static ip (which I recommend) then you should set these. Simply peek at what your router was assigned, and set yours the same. > > Mandrive will setup these during the installation phase. They will be > the dns servers of your isp. The are chosen automatically using DHCP > > If you have installed Apache it should already work using the default DHCP > settings. The best way to check if it is indeed working is to open your > favorite web browser and type in the following http://localhost or you can use the loopback address 127.0.0.1 > > if apache is running and working it will return some sort of default > page. Another way to check is from a command window type at the prompt > > /sbin/ifconfig > > you should get something like below > [dwmoar@bigdaddy ~]$ /sbin/ifconfig > eth0 Link encap:Ethernet HWaddr 00:50:8D:D1:FD:1B > inet addr:192.168.1.25 Bcast:192.168.1.255 Mask:255.255.255.0 > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:773645 errors:0 dropped:0 overruns:0 frame:0 > TX packets:440722 errors:479 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:1000 > RX bytes:1098692831 (1047.7 Mb) TX bytes:32637569 (31.1 Mb) > Interrupt:19 Base address:0xa000 > > lo Link encap:Local Loopback > inet addr:127.0.0.1 Mask:255.0.0.0 > UP LOOPBACK RUNNING MTU:16436 Metric:1 > RX packets:68 errors:0 dropped:0 overruns:0 frame:0 > TX packets:68 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:0 > RX bytes:3692 (3.6 Kb) TX bytes:3692 (3.6 Kb) > > [dwmoar@bigdaddy ~]$ > > using information from eth0 above find the inet addr: information on the > second line. That is the ip address assigned from DHCP in my case above it > is 192.168.1.25 (yours might be different) Now using that ip address, > from your web browser enter that IP as the url > > http://that IP Address <--- NOTE do NOT use www otherwise it will most > likely give you an error at this point. > > If everything is setup properly you will see some sort of a default web > page sent by apache. Congratulations your web server is working. > > I believe that Mandrivs still uses the following path as the document root > for Apache > > /var/www/html > > everything that you will see coming from apache at this point should be > from that path. > There is a philosophical issue here. Apache defaults to the above, which is fine for testing One school of thoughts maintains that you don't mess with or add to the root file structure, and that all 'growable' things should be in /var. I like to keep /var on a fairly small (10 gig) partition, because sometimes things go strange and logs get huge. This way if /var gets full, nothing else will get damaged. I put the the actual web pages on a huge partition, mounted in root, named something like /server But please, one step at a time. When your page is viewable as localhost and 127.0.0.1, then 'find' it as 192.168.0.21 from other machines. At this point consider your directory structure and space needs. > If you get to this point ok just drop me an email and I will help you from > there. > > -David > DM-WebDesigners.com > > PS remembers since you are using a private IP group your web page will > not be viewable from the Internet. It will only be seen from any computer > on your network, by using that IP address of the webserver. > >> >> >> Any help or advice would be greatly appreciated, >> Many thanks. >> >> Edd. Good luck Stuart |