LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 12-11-2013, 04:23 AM   #1
nickn0ck123
LQ Newbie
 
Registered: Dec 2013
Posts: 13

Rep: Reputation: Disabled
Cant access my hosted website


Hi sir, I am having trouble accessing the webserver that i setted up. i have a free domain at dot.tk and i have a static ip address over my ISP i already forwarded port80 over my server's Ip address. but still i am having trouble. web page is not available.

Please help me here. i want to host our website over here so that we dont pay for webhosting..


Thank you for your response.
 
Old 12-11-2013, 06:35 AM   #2
KanZen
LQ Newbie
 
Registered: Dec 2013
Posts: 7

Rep: Reputation: Disabled
Hi, could you narrow down your problem?

Is there firewall ruleset for a webserver?

Is the webserver functional from the lan?

Can you ping www.your-website.tld?
 
Old 12-11-2013, 07:35 AM   #3
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
A Record of the free domain point to your static IP address?
 
Old 12-11-2013, 09:09 PM   #4
nickn0ck123
LQ Newbie
 
Registered: Dec 2013
Posts: 13

Original Poster
Rep: Reputation: Disabled
i can access my webserver via lan. after turning off the Iptables firewall.

now. i forwarded port 80 to the server that i setted up. Upon entering the address on the address bar. it only says, waiting for example.com on the bottom left of the webpage. and i also tried to telnet it and i can connect via port 80. is there a problem with my httpd.conf?
 
Old 12-12-2013, 05:39 AM   #5
nickn0ck123
LQ Newbie
 
Registered: Dec 2013
Posts: 13

Original Poster
Rep: Reputation: Disabled
how can i make my website to be browseable in the internet. i have created a domain at dot.tk and and added hostname to my Static IP ADDRESS. the webpage only says waiting for reply. on my firewall i forwarded the port 80 to the ip address of my server. Im kinda stuck to this situation. could anyone please help me? thanks..
 
Old 12-12-2013, 05:28 PM   #6
KanZen
LQ Newbie
 
Registered: Dec 2013
Posts: 7

Rep: Reputation: Disabled
Hi, it seems you are really set to get your webpage up and out! Can you provide output from these commands?
Code:
 service httpd status
...or
systemctl status httpd.service
...or
/etc/init.d/httpd status
Or from the UI's toolbar find the service for your webserver and check for those red/grn blips.

Yes its silly but your service may not be active! Once I know you have the service on then you can post config files, but please start with a simple testpage display before trying to send out a large config file, hmm.

Last edited by KanZen; 12-12-2013 at 05:32 PM.
 
Old 12-12-2013, 07:29 PM   #7
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 665

Rep: Reputation: Disabled
What does the access logs says in this regards ?
Do the logs confirms that the request coming to the web server ? If yes how they are getting rejected ?
What firewall settings do you have ?
Is your Domain to IP (DNS) is correctly setup to resolve when the request raised with the Domain ?
 
Old 12-13-2013, 02:07 AM   #8
nickn0ck123
LQ Newbie
 
Registered: Dec 2013
Posts: 13

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by SAbhi View Post
What does the access logs says in this regards ?
Do the logs confirms that the request coming to the web server ? If yes how they are getting rejected ?
What firewall settings do you have ?
Is your Domain to IP (DNS) is correctly setup to resolve when the request raised with the Domain ?
hi sir how can i see the logs on this? i dont know can i see it by just using tail -f /var/log/messages?

i am using centos as a webserver and my firewall is Endian Firewall.
 
Old 12-13-2013, 02:17 AM   #9
nickn0ck123
LQ Newbie
 
Registered: Dec 2013
Posts: 13

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by KanZen View Post
Hi, it seems you are really set to get your webpage up and out! Can you provide output from these commands?
Code:
 service httpd status
...or
systemctl status httpd.service
...or
/etc/init.d/httpd status
Or from the UI's toolbar find the service for your webserver and check for those red/grn blips.

Yes its silly but your service may not be active! Once I know you have the service on then you can post config files, but please start with a simple testpage display before trying to send out a large config file, hmm.
hi sir httpd is running. i didnt turn off the default testpage. it suppose to show the apache webpage if its successfully established right?
 
Old 12-13-2013, 02:18 AM   #10
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 665

Rep: Reputation: Disabled
Quote:
Originally Posted by nickn0ck123 View Post
hi sir how can i see the logs on this? i dont know can i see it by just using tail -f /var/log/messages?

i am using centos as a webserver and my firewall is Endian Firewall.
Then my first question should be :
Code:
lsof -i:80
or 
# netstat -tlupn| grep 80
what webserver are you using ?

Code:
dig -x [your_webserver_ip]
Is your DNS points to your server IP ?

EDIT (ok i didnt saw the above comment): in case of apache
apache access logs should be at /var/log/httpd so as the error logs.

Last edited by SAbhi; 12-13-2013 at 02:20 AM.
 
Old 12-13-2013, 02:21 AM   #11
nickn0ck123
LQ Newbie
 
Registered: Dec 2013
Posts: 13

Original Poster
Rep: Reputation: Disabled
Im not so sure if the problem is my firewall. i have done forwarding ports here before but now its not working again. i dont know hows that posible but i didnt change any of my confguration. this is frustrating. hehehe
 
Old 12-14-2013, 04:18 AM   #12
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
I don't know about Endian, but some firewalls doesn't automatically open a port when you create a NAT-rule (=port forward).
So check your firewall rules, is port 80 open from WAN?
Also please answer SAbhi's questions.
 
Old 12-15-2013, 10:28 PM   #13
nickn0ck123
LQ Newbie
 
Registered: Dec 2013
Posts: 13

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by SAbhi View Post
Then my first question should be :
Code:
lsof -i:80
or 
# netstat -tlupn| grep 80
what webserver are you using ?

Code:
dig -x [your_webserver_ip]
Is your DNS points to your server IP ?

EDIT (ok i didnt saw the above comment): in case of apache
apache access logs should be at /var/log/httpd so as the error logs.
here is the result of the netstat
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 3325/httpd

its open right? this is on the firewall side.

my DNS on my server is google 8.8.8.8

on my domain cpanel. i pointed my static IP address to the domain. this is the right thing to do right? and then. on my firewall i forwarder port80 to my server's Ip address.

i dont know if the firewall is ahving a problem or my server is just not functioning right.
 
Old 12-15-2013, 10:38 PM   #14
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 665

Rep: Reputation: Disabled
Quote:
on my domain cpanel. i pointed my static IP address to the domain. this is the right thing to do right? and then. on my firewall i forwarder port80 to my server's Ip address.
Thats what i am asking how did you made your ip pointed out to the dns ? (i was expecting dig's output in my previous comment)
Sorry but untill adn unless you provide me with sufficient info i cant help. i asked for logs too and still not provided.
 
Old 12-16-2013, 01:11 AM   #15
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by nickn0ck123 View Post
i can access my webserver via lan. after turning off the Iptables firewall.

now. i forwarded port 80 to the server that i setted up. Upon entering the address on the address bar. it only says, waiting for example.com on the bottom left of the webpage. and i also tried to telnet it and i can connect via port 80. is there a problem with my httpd.conf?
When you successfully telnet to port 80, what prompts or messages do you get? Are you sure this telnet goes to your server or is answered by some other server?
Same question when you run telnet localhost 80 on the server in question.

On my system, this is what happens when I run telnet on the server:
Code:
# telnet 192.168.1.5 80
Trying 192.168.1.5...
Connected to 192.168.1.5.
Escape character is '^]'.
blabla
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>501 Method Not Implemented</title>
</head><body>
<h1>Method Not Implemented</h1>
<p>blabla to / not supported.<br />
</p>
<hr>
<address>Apache/2.2.15 (CentOS) Server at athlon64/192.168.1.5 Port 80</address>
</body></html>
Connection closed by foreign host.
The "blabla" string is my input, the lines after it come from httpd. You can customise the identification line (<address>) using ServerName in the config file.

This telnet session generated an entry [error] [client 192.168.1.5] Invalid method in request blabla in the error log /etc/httpd/logs/error_log.

Last edited by berndbausch; 12-16-2013 at 01:29 AM. Reason: added info
 
  


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
Anyone on my internet can't access my self-hosted website bengalman211 Linux - Server 6 09-30-2013 09:43 PM
[SOLVED] cant access my website hosted in my server sudeep_mansh Linux - Networking 6 07-26-2013 08:00 AM
my website hosted from home pmarian Linux - Newbie 9 11-13-2010 01:08 PM
viewing an externally hosted website from within a given website andrews-mark Linux - Server 6 10-07-2008 12:11 AM
Virtual hosted website not found toes Linux - Networking 7 07-14-2006 03:11 PM

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

All times are GMT -5. The time now is 08:57 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