HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   Can't get server to work on the web need some help (http://www.howtoforge.com/forums/showthread.php?t=18435)

kadi 14th December 2007 19:57

Can't get server to work on the web need some help
 
1 Attachment(s)
hello everybody
this is my first try with linux server so i am no expert, but i learned some new things with linux, i used debian etch 4.0r1server also i followed the perfect setup for debian etch instructions and thanks alot to mr/Falko without this help it will take me may be at least a few months to set it up.
I have ISPConfig installed and i setup the DNS on it for the domain ,i checked the box Create DNS , the domain is registered with a company (registerar) , also i have to mension that i am using a Router with a cable modem.
now I can see the site (index) on the localhost but i can't see it or access it
outside the server on the web or the internet, i tried so many computers to
get to the site from outside but it does not work.
I ping the dns from network tools and it works fine also if i enter the ip in browser from outside computer on the web it comes on with shared IP page but if i use the name www.mydomain.com it syas cannot find page.
I ping the dns [ns1.mydomain.com] from another computer it says Request timed out.
I don't know what i am missing , i even reinstalled the OS 3 times to clean the system and still didn't work.
so i am not sure what could be the reason, is it the files like hosts, hostname, network interfaces, or could be from ISPConfig ?
I attached some files in zip format it may help.
Thanks very much for help in advance it will be appreciated.

falko 15th December 2007 16:33

Can you post the real domain name so that I can test?

kadi 15th December 2007 20:20

Thanks for your reply
 
4 Attachment(s)
hello mr/Falko
Thanks for your response.
the domain name is: kandkmarket.com
I attached some files may be it will help.
Thanks again for your help i appreciate it.

falko 16th December 2007 13:59

Quote:

Originally Posted by kadi
the domain name is: kandkmarket.com

That domain doesn't exist:

Code:

server2:/home/admin# dig kandkmarket.com

; <<>> DiG 9.2.4 <<>> kandkmarket.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 51982
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;kandkmarket.com.              IN      A

;; Query time: 597 msec
;; SERVER: 145.253.2.75#53(145.253.2.75)
;; WHEN: Sun Dec 16 13:58:31 2007
;; MSG SIZE  rcvd: 33

server2:/home/admin# dig www.kandkmarket.com

; <<>> DiG 9.2.4 <<>> www.kandkmarket.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 34744
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.kandkmarket.com.          IN      A

;; Query time: 283 msec
;; SERVER: 145.253.2.75#53(145.253.2.75)
;; WHEN: Sun Dec 16 13:58:36 2007
;; MSG SIZE  rcvd: 37

server2:/home/admin# dig ns kandkmarket.com

; <<>> DiG 9.2.4 <<>> ns kandkmarket.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 65426
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;kandkmarket.com.              IN      NS

;; Query time: 289 msec
;; SERVER: 145.253.2.75#53(145.253.2.75)
;; WHEN: Sun Dec 16 13:58:41 2007
;; MSG SIZE  rcvd: 33

server2:/home/admin#

There aren't even nameservers for that domain. Are you sure you registered that domain?

kadi 16th December 2007 21:02

Thanks again and here is whois results.
 
hello again
here is whois results for the site :
Domain Name: KANDKMARKET.COM
Registrar: TUCOWS INC.
Whois Server: whois.tucows.com
Referral URL: http://domainhelp.opensrs.net
Name Server: NS1.KANDKMARKET.COM
Name Server: NS2.KANDKMARKET.COM
Status: clientTransferProhibited
Status: clientUpdateProhibited
Updated Date: 10-dec-2007
Creation Date: 04-mar-2002
Expiration Date: 04-mar-2008
You think the registrar could send the dns wrong numbers ? by the way i have
to explain somthing:
1- i am with cable company with cable modem and i am using a netgear
router also i setup a static ip in the router with: 192.168.0.100.
2- i called cable company and they gave me the dns numbers and when
i ping with network tools this numbers works.
I don't know what to say , if it is my server or from the registrar , would it be
a bad idea to go to easyDNS and take a secondary dns ? is that will work?
as i mensioned i my first post that i am very new to linux and i am trying it
because i got tired of others, i am doing my best to get this server working,
sometime may be i mess up the files because i don't know better.
should i format or just install debian from the beginning again? another thing , could it be ISPConfig setup for dns is wrong ?
Today i got email from the registrar(domainnamesystems) they offer a dns $10 a year also
they offer a dynamic dns for cable modems and router as private server, If you think
it is better to take one of those fine with me.
also i saw a tutorial on the web (How to create your own DNS) finally my cable company
support said i don't need one because i am using router.

Thanks again for your help

falko 17th December 2007 17:24

At least you have nameservers now:

Code:

[root@server1 ~]# dig ns kandkmarket.com

; <<>> DiG 9.2.4 <<>> ns kandkmarket.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47938
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 2

;; QUESTION SECTION:
;kandkmarket.com.              IN      NS

;; ANSWER SECTION:
kandkmarket.com.        104781  IN      NS      ns1.kandkmarket.com.
kandkmarket.com.        104781  IN      NS      ns2.kandkmarket.com.

;; ADDITIONAL SECTION:
ns2.kandkmarket.com.    104781  IN      A      24.158.63.9
ns1.kandkmarket.com.    104781  IN      A      24.158.63.8

;; Query time: 159 msec
;; SERVER: 62.109.123.7#53(62.109.123.7)
;; WHEN: Mon Dec 17 17:15:20 2007
;; MSG SIZE  rcvd: 101

[root@server1 ~]#

Now you can go ahead and create records for kandkmarket.com on ns1.kandkmarket.com and ns2.kandkmarket.com. :)

kadi 17th December 2007 20:07

Thanks mr/falco again
 
hello mr/falco again
I really apreciate you help very much.
I added records like you said in the previous post and i think it not the dns
the problem may be either it is comming from the router or one of my files
is not right because i add the index page to:
/var/www/web1/web/kandkmarket.com
and still on my server it says : (server not found) also from other computers
(page cannot be displayed), I put the sites available for kandkmarket and link it
to sites enabled also and i will give you here what the (vhosts_ispconfig) looks
like , & sites enabled (www.kandkmarket also looks like:

vhosts_ispconfig :
-------------------------------
###################################
#
# ISPConfig vHost Configuration File
# Version 1.0
#
###################################
#
NameVirtualHost 192.168.0.100:80
<VirtualHost 192.168.0.100:80>
ServerName localhost
ServerAdmin root@localhost
DocumentRoot /var/www/sharedip
</VirtualHost>
#
#
######################################
# Vhost: www.kandkmarket.com:80
######################################
#
#
<VirtualHost 192.168.0.100:80>
SuexecUserGroup nobody web1
ServerName www.kandkmarket.com:80
ServerAdmin webmaster@kandkmarket.com
DocumentRoot /var/www/web1/web
ServerAlias www.kandkmarket.com
DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm
ScriptAlias /cgi-bin/ /var/www/web1/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
ErrorLog /var/www/web1/log/error.log
AddType application/x-httpd-php .php .php3 .php4 .php5
<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php3>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php4>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php5>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
php_admin_flag safe_mode On
php_admin_value open_basedir /var/www/web1/
php_admin_value file_uploads 1
php_admin_value upload_tmp_dir /var/www/web1/phptmp/
php_admin_value session.save_path /var/www/web1/phptmp/
Alias /error/ "/var/www/web1/web/error/"
ErrorDocument 400 /error/invalidSyntax.html
ErrorDocument 401 /error/authorizationRequired.html
ErrorDocument 403 /error/forbidden.html
ErrorDocument 404 /error/fileNotFound.html
ErrorDocument 405 /error/methodNotAllowed.html
ErrorDocument 500 /error/internalServerError.html
ErrorDocument 503 /error/overloaded.html
AliasMatch ^/~([^/]+)(/(.*))? /var/www/web1/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web1/user/$1/web/$3
</VirtualHost>
#
#
#
-----------------------------------------------------------------------------------------
here is sites enabled (www.kandkmarket.com
---------------------------------------------------------------
#
# kandkmarket.com (/etc/apache2/sites-available/www.kandkmarket.com)
#
<VirtualHost *>
ServerAdmin webmaster@kandkmarket.com
ServerName www.kandkmarket.com
ServerAlias kandkmarket.com
# Indexes + Directory Root.
DirectoryIndex index.html
DocumentRoot /var/www/web1/web

# CGI Directory
ScriptAlias /cgi-bin /var/www/web1/cgi-bin
<Location /cgi-bin>
Options +ExecCGI
</Location>


# Logfiles
ErrorLog /var/www//web1/log/error.log
CustomLog /var/www/web1/log/access.log combined
</VirtualHost>
-----------------------------------------------------------------------------------
Here is Bind (named.conf)
-------------------------------------
options {
pid-file "/var/run/bind/run/named.pid";
directory "/etc/bind";
auth-nxdomain no;
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};

//
// a caching only nameserver config
//
zone "." {
type hint;
file "db.root";
};

zone "0.0.127.in-addr.arpa" {
type master;
file "db.local";
};

zone "0.168.192.in-addr.arpa" {
type master;
file "pri.0.168.192.in-addr.arpa";
};


zone "kandkmarket.com" {
type master;
file "pri.kandkmarket.com";
};


zone "kandkmarket.com" {
type slave;
file "sec.kandkmarket.com";
masters { 192.168.0.100; };
};


//// MAKE MANUAL ENTRIES BELOW THIS LINE! ////

-------------------------------------------------------------------------------------------
Here is the /etc/hostname file:
----------------------------------
kserver.kandkmarket.com
==========================
Also the /etc/hosts file
---------------------------------
# 'hosts' file configuration.

127.0.0.1 localhost.localdomain localhost
192.168.0.100 kserver.kandkmarket.com kserver


# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
===============================================
By the way i thought about changing the port on the router may be that is what it is,
and when i try to add (service, rules) i got (Inbound) & (outbound) i didn't know which one
to choose + There is (start port) & (end port) inside both inbound & outbound
If i try this address: http://192.168.0.100/www.kandkmarket.com i got:
The requested URL /www.kandkmarket.com/ was not found on this server.
Apache/2.2.3 (Debian) PHP/5.2.0-8+etch7 mod_ssl/2.2.3 OpenSSL/0.9.8c Server at 192.168.0.100 Port 80
and try this one :http://127.0.0.1/www.kandkmarket.com i got the index page.
I hope i am not bothering you too much, i know your time is valuable.
I almost gave up on this server but i hate to go to others OS, i know i filled
up those posts with my files and sorry about that.
for now i can see everything under (services) in ispconfig (online)
so at least we correct this part thanks to you.
Thanks alot again.

falko 18th December 2007 17:27

Your nameservers are gone:
Code:

[root@server1 ~]# dig ns kandkmarket.com

; <<>> DiG 9.5.0a6 <<>> ns kandkmarket.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 61708
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;kandkmarket.com.              IN      NS

;; Query time: 7 msec
;; SERVER: 213.191.92.86#53(213.191.92.86)
;; WHEN: Tue Dec 18 18:28:59 2007
;; MSG SIZE  rcvd: 33

[root@server1 ~]#

What did you do?

kadi 18th December 2007 18:32

Hello again mr/Falko
 
Hello again mr/Falko
I didn't do anything, i just turn my computer off at night, i cheched it in the
morning and here is the results :

kserver:~# dig ns1.kandkmarket.com

; <<>> DiG 9.3.4 <<>> ns1.kandkmarket.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34370
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2

;; QUESTION SECTION:
;ns1.kandkmarket.com. IN A

;; ANSWER SECTION:
ns1.kandkmarket.com. 4439 IN A 24.158.63.8

;; AUTHORITY SECTION:
kandkmarket.com. 4439 IN NS ns1.kandkmarket.com.
kandkmarket.com. 4439 IN NS ns2.kandkmarket.com.

;; ADDITIONAL SECTION:
ns1.kandkmarket.com. 4439 IN A 24.158.63.8
ns2.kandkmarket.com. 4439 IN A 24.158.63.9

;; Query time: 122 msec
;; SERVER: 24.158.63.8#53(24.158.63.8)
;; WHEN: Tue Dec 18 11:58:29 2007
;; MSG SIZE rcvd: 132
================================================== ====
One last thing i have to tell you that Now everything working fine on this computer : apache2 with no errors , proftpd no errors ..etc, except the site not showing either on localhost or the web.
I used the command (hostname|nslookup) and here the resuls:

kserver:~# hostname | nslookup
> Server: 24.158.63.8
Address: 24.158.63.8#53

** server can't find kserver.kandkmarket.com: SERVFAIL
>
================================================== ====
and when i used (ifconfig -a)
it says :
kserver:~# ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:0E:A6:30:9F:C2
inet addr:192.168.0.100 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::20e:a6ff:fe30:9fc2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2707 errors:0 dropped:0 overruns:0 frame:0
TX packets:2800 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1377926 (1.3 MiB) TX bytes:371267 (362.5 KiB)
Interrupt:201 Base address:0xd800

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:127 errors:0 dropped:0 overruns:0 frame:0
TX packets:127 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:11943 (11.6 KiB) TX bytes:11943 (11.6 KiB)

sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 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:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
================================================== =====
Thanks very much for your help again.

falko 19th December 2007 17:44

I'm still not seeing any nameservers:

Code:

server1:~# dig ns kandkmarket.com

; <<>> DiG 9.3.4 <<>> ns kandkmarket.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 22753
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;kandkmarket.com.              IN      NS

;; Query time: 16 msec
;; SERVER: 213.191.74.12#53(213.191.74.12)
;; WHEN: Wed Dec 19 19:35:21 2007
;; MSG SIZE  rcvd: 33

server1:~#



All times are GMT +2. The time now is 07:06.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.