LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   My server came with apache and centos 5 installed but need help. (https://www.linuxquestions.org/questions/linux-server-73/my-server-came-with-apache-and-centos-5-installed-but-need-help-737258/)

shadiadiph 07-02-2009 02:11 PM

My server came with apache and centos 5 installed but need help.
 
Hi sorry for the stupid question but I am totally green to this I know nothing about anything except php etc. i just bought my first webserver and have set it up turned it on and am already getting confused. My server came with centos 5 installed says that apache is intalled. I am using set up an account at dyndns.com so I have my DNS server right now if i go to my nameserver it finds my router but is then asking me for the router password there is no security set up on the router but it has open access but it keeps asking me for the router username and password i tried the routers admin username and password and it logs me into my router admin. I guess something is wrong here correct?

In centos 5 the only thing I have changed so far is in sytem administration server settings http i changed server to my name server name was this the correct thing to do?

I am not sure if php is installed or sql I have absolutely no idea what to do next some advice would be most helpful thanks in advance.

farslayer 07-02-2009 02:17 PM

If you are browsing to your Dynamic DNS name and ending up at the web admin interface for your router you have a couple issues..

1. Web administration to your router is open facing the Internet.. you should really only allow admin access to your router locally.


2. You need to forward Port 80 from your router to the Web server. Check your routers user manual for directions on how to forward a single port to a single internal IP address.

shadiadiph 07-02-2009 03:05 PM

mm thanks I think I am getting somewhere
 
mm thanks i think i am heading in the right direction its asking me for my severs ip address is it 127.0.0.0/8?? thats what it says in the proxy advanced settings??

frankbell 07-02-2009 03:50 PM

127.0.0.1 is default for "localhost" or this computer here what I am looking at.

Try this. Open a terminal as root and run the command ifconfig.

It should return something that looks like this. "eth0" is the wired connection which I'm not using right now. "eth1" is the wireless. "lo" is local. The wireless is the active connection, so it shows an valid ip address.

Code:

eth0      Link encap:Ethernet  HWaddr 00:23:ae:41:fa:2d 
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:18

eth1      Link encap:Ethernet  HWaddr 00:22:5f:b3:37:cb 
          inet addr:192.168.1.105  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::222:5fff:feb3:37cb/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3216 errors:0 dropped:0 overruns:0 frame:3678
          TX packets:2703 errors:6 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3281928 (3.2 MB)  TX bytes:392708 (392.7 KB)
          Interrupt:17 Base address:0xc000

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:4050 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4050 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:178672 (178.6 KB)  TX bytes:178672 (178.6 KB)


shadiadiph 07-02-2009 07:03 PM

thanks
 
i will try that later i added the http server to my modem ans since then haven't been able to get back online i just instaled a new modem just so i can have internet access for now tried resetting my router and it will not reset it will not let me back in the admin part of the router even the only website i can access from it is that of the dns company when i get the router fixed later i shall let you know how i got on thanks

shadiadiph 07-03-2009 10:44 AM

hi
 
just spent 12 hours trying to get my tp link router working again finally got it working. in my router settings there is a section NAT where i can add virtual servers which i tried and selected add webserver http and it automatically sets the port to 80 but then says something about another port being changed to 8080 also the is a port triggering section and a DMZ Host the last two i haven't played aroud with in another section there is a dynamic dns set up which i did set up so basically last tme i added the http server and dynamic dns then my router stopped working and would not let me access the internet can anyone give me some advice on this i am using a tp link TD-W8910G any advice would be good in the server settings http on centos 5 it says it is listening to all connections on port 80. sorry i haven't got a clue what i am doing i was thinking about reformating my drives and doing a fresh install but not sure if thats the way to go. i do havea fedora 7 disk i didn't set up the centos 5 any input would be appreciated.

shadiadiph 07-03-2009 02:55 PM

mm now i've got my router working its not locking me out anymore problem is i have set up virtual server as websever http and dynamic dns settings from dyndns.com and just keeps logging into my router admin so port 80 isn't blocked but on the virtual server set up i pointed it all to port 80 and to the ip address of eth0 which is the computer my server is on.

Pulling my hair out been reading lots online but getting nowhere i think when i set up port 80 as my http server it said it was changing the router port to 8080 but when i enter my dns name server in the browesr i just keep gettin my router admin its probably something really simple but have no idea what?

shadiadiph 07-04-2009 04:10 AM

As I said I am new to tis and have no idea what i am doing. I just learned that when trying to access my server from outside it will always direct me to the admin page of my router. If I try to access my server from outside I get An error has occured while trying to get the page 403 you are not authorized to view this page (Forbidden)?

shadiadiph 07-04-2009 04:15 AM

Frankbell thaks for that but i don't really understand it when i run ifconfig this is what i get

Code:

eth0      Link encap:Ethernet  HWaddr 00:15:17:83:0B:8C 
          inet addr:192.168.1.53  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::215:17ff:fe83:b8c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9779 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3230 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:4293710 (4.0 MiB)  TX bytes:340359 (332.3 KiB)
          Memory:f8820000-f8840000

eth1      Link encap:Ethernet  HWaddr 00:15:17:83:0B:8D 
          inet addr:192.168.1.3  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::215:17ff:fe83:b8d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:13623 errors:0 dropped:0 overruns:0 frame:0
          TX packets:15291 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:6611707 (6.3 MiB)  TX bytes:2579006 (2.4 MiB)

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:1495 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1495 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2996071 (2.8 MiB)  TX bytes:2996071 (2.8 MiB)

peth1    Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF 
          inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
          UP BROADCAST RUNNING NOARP  MTU:1500  Metric:1
          RX packets:13668 errors:0 dropped:0 overruns:0 frame:0
          TX packets:15345 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:6621125 (6.3 MiB)  TX bytes:2589463 (2.4 MiB)
          Memory:f8800000-f8820000

vif0.1    Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF 
          inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
          UP BROADCAST RUNNING NOARP  MTU:1500  Metric:1
          RX packets:15291 errors:0 dropped:0 overruns:0 frame:0
          TX packets:13623 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2579006 (2.4 MiB)  TX bytes:6611707 (6.3 MiB)

virbr0    Link encap:Ethernet  HWaddr 00:00:00:00:00:00 
          inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
          inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:45 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:9272 (9.0 KiB)

xenbr1    Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF 
          UP BROADCAST RUNNING NOARP  MTU:1500  Metric:1
          RX packets:3614 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:367087 (358.4 KiB)  TX bytes:0 (0.0 b)


shadiadiph 07-04-2009 06:02 AM

Hi I have just tried another setting and just configured my router as it recommends as below not sure if i have the server ip address right?

Code:

Server Name External Port Start  External Port End          Protocol          Internal Port Start          Internal Port End          Server IP Address         
Name1                    80                          80                TCP/UDP                80                      80                  127.0.0.1       
Name2                  443                          443                TCP/UDP              443                      443                  127.0.0.1

I am still getting 502 Bad Gateway Response was received by another proxy server or the destination origin server??

also when i run the command httpd i am getting

Code:

(98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down


shadiadiph 07-05-2009 09:23 PM

ok no problem it seems to be working now but i am sure i shall have some more ridiculous questions shortly.

farslayer 07-05-2009 09:25 PM

looks like your server address is 192.168.1.53 and that is what your Port forwarding should point to, not 127.0.0.1

127.0.0.1 is a loopback address, nothing but the local machine can connect to that address..


All times are GMT -5. The time now is 03:53 AM.