LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-02-2009, 03:11 PM   #1
shadiadiph
LQ Newbie
 
Registered: Jul 2009
Location: Thailand
Posts: 26

Rep: Reputation: 15
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.
 
Old 07-02-2009, 03:17 PM   #2
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
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.
 
Old 07-02-2009, 04:05 PM   #3
shadiadiph
LQ Newbie
 
Registered: Jul 2009
Location: Thailand
Posts: 26

Original Poster
Rep: Reputation: 15
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??
 
Old 07-02-2009, 04:50 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,777
Blog Entries: 28

Rep: Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318
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)
 
Old 07-02-2009, 08:03 PM   #5
shadiadiph
LQ Newbie
 
Registered: Jul 2009
Location: Thailand
Posts: 26

Original Poster
Rep: Reputation: 15
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
 
Old 07-03-2009, 11:44 AM   #6
shadiadiph
LQ Newbie
 
Registered: Jul 2009
Location: Thailand
Posts: 26

Original Poster
Rep: Reputation: 15
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.
 
Old 07-03-2009, 03:55 PM   #7
shadiadiph
LQ Newbie
 
Registered: Jul 2009
Location: Thailand
Posts: 26

Original Poster
Rep: Reputation: 15
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?
 
Old 07-04-2009, 05:10 AM   #8
shadiadiph
LQ Newbie
 
Registered: Jul 2009
Location: Thailand
Posts: 26

Original Poster
Rep: Reputation: 15
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)?
 
Old 07-04-2009, 05:15 AM   #9
shadiadiph
LQ Newbie
 
Registered: Jul 2009
Location: Thailand
Posts: 26

Original Poster
Rep: Reputation: 15
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)
 
Old 07-04-2009, 07:02 AM   #10
shadiadiph
LQ Newbie
 
Registered: Jul 2009
Location: Thailand
Posts: 26

Original Poster
Rep: Reputation: 15
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
 
Old 07-05-2009, 10:23 PM   #11
shadiadiph
LQ Newbie
 
Registered: Jul 2009
Location: Thailand
Posts: 26

Original Poster
Rep: Reputation: 15
ok no problem it seems to be working now but i am sure i shall have some more ridiculous questions shortly.
 
Old 07-05-2009, 10:25 PM   #12
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
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..
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Installed CentOS Directory Server...what now? custangro Linux - General 19 12-04-2009 05:38 PM
LXer: Tutorial: Red Hat / CentOS - Chroot Apache 2 Web Server LXer Syndicated Linux News 0 12-25-2008 03:40 AM
LXer: Create Your Own Web Server With BIND And Apache On CentOS 5 LXer Syndicated Linux News 0 07-02-2008 04:11 PM
CentOS Apache Server - identifying (virtual host) target of spam attack Lord Matt Linux - Server 3 04-07-2008 03:17 AM
Installing apache 2.0.59 on centos server blong4life Linux - Newbie 1 10-02-2006 05:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:14 PM.

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