LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Why doesn't the subdomain work externally? (https://www.linuxquestions.org/questions/linux-networking-3/why-doesnt-the-subdomain-work-externally-4175432079/)

Anderl 10-13-2012 05:38 PM

Why doesn't the subdomain work externally?
 
Hello guys,

I'm new here and I'm trying to setup a subdomain on my domain "neoplaygrounds.com".

I've setup Bind9 and it's working, I even checked logs and no errors - everything is working but I can only find subdomain in dig writing "dig @SERVER_IP cp.neoplaygrounds.com" or "dig @127.0.0.1 cp.neoplaygrounds.com" ( On nslookup I can do a lookup on nameservers & subdomain and works ) but if I try to run dig without @127.0.0.1 or @SERVER_IP it works but it doesn't say "(1 server found)" anymore and on Windows it doesn't even recognize on pinging nor on any browser.

Why that and what can I do?

By the way, here are logs and files if needed:

/var/log/syslog:

Quote:

Oct 14 04:04:33 vps named[4197]: starting BIND 9.7.3 -u bind -t /var/lib/named
Oct 14 04:04:33 vps named[4197]: built with '--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--sysconfdir=/etc/bind' '--localstatedir=/var' '--enable-threads' '--enable-largefile' '--with-libtool' '--enable-shared' '--enable-static' '--with-openssl=/usr' '--with-gssapi=/usr' '--with-gnu-ld' '--with-dlz-postgres=no' '--with-dlz-mysql=no' '--with-dlz-bdb=yes' '--with-dlz-filesystem=yes' '--with-dlz-ldap=yes' '--with-dlz-stub=yes' '--with-geoip=/usr' '--enable-ipv6' 'CFLAGS=-fno-strict-aliasing -DDIG_SIGCHASE -O2' 'LDFLAGS=' 'CPPFLAGS='
Oct 14 04:04:33 vps named[4197]: adjusted limit on open files from 1024 to 1048576
Oct 14 04:04:33 vps named[4197]: found 2 CPUs, using 2 worker threads
Oct 14 04:04:33 vps named[4197]: using up to 4096 sockets
Oct 14 04:04:33 vps named[4197]: loading configuration from '/etc/bind/named.conf'
Oct 14 04:04:33 vps named[4197]: reading built-in trusted keys from file '/etc/bind/bind.keys'
Oct 14 04:04:33 vps named[4197]: using default UDP/IPv4 port range: [1024, 65535]
Oct 14 04:04:33 vps named[4197]: using default UDP/IPv6 port range: [1024, 65535]
Oct 14 04:04:33 vps named[4197]: listening on IPv6 interfaces, port 53
Oct 14 04:04:33 vps named[4197]: listening on IPv4 interface lo, 127.0.0.1#53
Oct 14 04:04:33 vps named[4197]: listening on IPv4 interface venet0, 127.0.0.2#53
Oct 14 04:04:33 vps named[4197]: listening on IPv4 interface venet0:0, 178.238.227.167#53
Oct 14 04:04:33 vps named[4197]: generating session key for dynamic DNS
Oct 14 04:04:33 vps named[4197]: set up managed keys zone for view _default, file 'managed-keys.bind'
Oct 14 04:04:33 vps named[4197]: automatic empty zone: 254.169.IN-ADDR.ARPA
Oct 14 04:04:33 vps named[4197]: automatic empty zone: 2.0.192.IN-ADDR.ARPA
Oct 14 04:04:33 vps named[4197]: automatic empty zone: 100.51.198.IN-ADDR.ARPA
Oct 14 04:04:33 vps named[4197]: automatic empty zone: 113.0.203.IN-ADDR.ARPA
Oct 14 04:04:33 vps named[4197]: automatic empty zone: 255.255.255.255.IN-ADDR.ARPA
Oct 14 04:04:33 vps named[4197]: automatic empty zone: 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA
Oct 14 04:04:33 vps named[4197]: automatic empty zone: 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA
Oct 14 04:04:33 vps named[4197]: automatic empty zone: D.F.IP6.ARPA
Oct 14 04:04:33 vps named[4197]: automatic empty zone: 8.E.F.IP6.ARPA
Oct 14 04:04:33 vps named[4197]: automatic empty zone: 9.E.F.IP6.ARPA
Oct 14 04:04:33 vps named[4197]: automatic empty zone: A.E.F.IP6.ARPA
Oct 14 04:04:33 vps named[4197]: automatic empty zone: B.E.F.IP6.ARPA
Oct 14 04:04:33 vps named[4197]: automatic empty zone: 8.B.D.0.1.0.0.2.IP6.ARPA
Oct 14 04:04:33 vps named[4197]: command channel listening on 127.0.0.1#953
Oct 14 04:04:33 vps named[4197]: command channel listening on ::1#953
Oct 14 04:04:33 vps named[4197]: zone 0.in-addr.arpa/IN: loaded serial 1
Oct 14 04:04:33 vps named[4197]: zone 127.in-addr.arpa/IN: loaded serial 1
Oct 14 04:04:33 vps named[4197]: /etc/bind/178.238.227.rev:1: no TTL specified; using SOA MINTTL instead
Oct 14 04:04:33 vps named[4197]: zone 227.238.178.IN-ADDR.ARPA/IN: loaded serial 2012101301
Oct 14 04:04:33 vps named[4197]: zone 255.in-addr.arpa/IN: loaded serial 1
Oct 14 04:04:33 vps named[4197]: zone neoplaygrounds.com/IN: loaded serial 2006081401
Oct 14 04:04:33 vps named[4197]: zone localhost/IN: loaded serial 2
Oct 14 04:04:33 vps named[4197]: managed-keys-zone ./IN: loaded serial 0
Oct 14 04:04:33 vps named[4197]: running
Oct 14 04:04:33 vps named[4197]: zone 227.238.178.IN-ADDR.ARPA/IN: sending notifies (serial 2012101301)
Oct 14 04:04:33 vps named[4197]: zone neoplaygrounds.com/IN: sending notifies (serial 2006081401)
/etc/bind/neoplaygrounds.db:

Quote:

$ORIGIN neoplaygrounds.com.
$TTL 1d

neoplaygrounds.com. IN SOA ns1.neoplaygrounds.com. ns2.neoplaygrounds.com. (
2006081401
28800
3600
604800
38400
)

neoplaygrounds.com. IN NS ns1.neoplaygrounds.com.
neoplaygrounds.com. IN NS ns2.neoplaygrounds.com.
@ IN A SERVER_IP_GONE_HERE ( I USED EXTERNAL ONE, IS IT RIGHT? )
www IN A SERVER_IP_GONE_HERE ( I USED EXTERNAL ONE, IS IT RIGHT? )
cp IN A SERVER_IP_GONE_HERE ( I USED EXTERNAL ONE, IS IT RIGHT? )
ns1 IN A SERVER_IP_GONE_HERE ( I USED EXTERNAL ONE, IS IT RIGHT? )
ns2 IN A SERVER_IP_GONE_HERE ( I USED EXTERNAL ONE, IS IT RIGHT? )
Reverse DNS:

Quote:

@ IN SOA ns1.neoplaygrounds.com. ns2.neoplaygrounds.com. (
2012101301;
28800;
604800;
604800;
86400
)

IN NS ns1.neoplaygrounds.com.
IN NS ns2.neoplaygrounds.com.
167 IN PTR SERVER_IP_GONE_HERE ( I USED EXTERNAL ONE, IS IT RIGHT? )
/etc/bind/named.conf.options:

Quote:

options {
directory "/etc/bind";


forwarders {
8.8.8.8;
8.8.4.4;
};

auth-nxdomain no;
listen-on-v6 { any; };
};
/etc/bind/named.conf.local:

Quote:

//
// Do any local configuration here
//

// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";

zone "neoplaygrounds.com" {
type master;
file "/etc/bind/neoplaygrounds.db";
};

zone "227.238.178.IN-ADDR.ARPA" {
type master;
file "/etc/bind/178.238.227.rev";
};


Anderl 10-14-2012 06:46 AM

Bump.

Snark1994 10-14-2012 07:02 AM

Bumping is against the LQ rules and also general netiquette.

I believe you need to put the following information in your httpd.conf (based on some googling):

Code:

Listen 80
NameVirtualHost *

<VirtualHost *>
  ServerName www.domain.com
  DocumentRoot /home/httpd/htdocs/
</VirtualHost>

<VirtualHost *>
  ServerName subdomain.domain.com
  DocumentRoot /home/httpd/htdocs/subdomain/
</VirtualHost>

You will obviously have to enter your own domain and directory structure.

Anderl 10-14-2012 07:08 AM

Quote:

Originally Posted by Snark1994 (Post 4805302)
Bumping is against the LQ rules and also general netiquette.

I believe you need to put the following information in your httpd.conf (based on some googling):

Code:

Listen 80
NameVirtualHost *

<VirtualHost *>
  ServerName www.domain.com
  DocumentRoot /home/httpd/htdocs/
</VirtualHost>

<VirtualHost *>
  ServerName subdomain.domain.com
  DocumentRoot /home/httpd/htdocs/subdomain/
</VirtualHost>

You will obviously have to enter your own domain and directory structure.

Sorry, I was desesperated. I've been whole night searching and trying new configs lol

By the way, doing what you said I get these errors:

Quote:

root@vps:~# service apache2 start
Starting web server: apache2(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
failed!
EDIT: After running some codes, Apache2 finally ran without errors but the subdomain still doesn't work.

Here is what appears when I run "dig cp.neoplaygrounds.com":

Quote:

root@vps:~# dig cp.neoplaygrounds.com

; <<>> DiG 9.7.3 <<>> cp.neoplaygrounds.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19694
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;cp.neoplaygrounds.com. IN A

;; ANSWER SECTION:
cp.neoplaygrounds.com. 0 IN A 67.215.77.132

;; Query time: 17 msec
;; SERVER: 208.67.220.220#53(208.67.220.220)
;; WHEN: Sun Oct 14 18:36:21 2012
;; MSG SIZE rcvd: 55
This is what appears when I do "dig @127.0.0.1 cp.neoplaygrounds.com":

Quote:

root@vps:~# dig @127.0.0.1 cp.neoplaygrounds.com

; <<>> DiG 9.7.3 <<>> @127.0.0.1 cp.neoplaygrounds.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 61014
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;cp.neoplaygrounds.com. IN A

;; ANSWER SECTION:
cp.neoplaygrounds.com. 86400 IN CNAME 178.238.227.167.neoplaygrounds.com.

;; AUTHORITY SECTION:
neoplaygrounds.com. 38400 IN SOA ns1.neoplaygrounds.com. ns2.neoplaygrounds.com. 2006081401 28800 3600 604800 38400

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sun Oct 14 18:36:50 2012
;; MSG SIZE rcvd: 113
And this is what appears when I run "dig @localhost cp.neoplaygrounds.com":

Quote:

root@vps:~# dig @localhost cp.neoplaygrounds.com

; <<>> DiG 9.7.3 <<>> @localhost cp.neoplaygrounds.com
; (2 servers found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 44316
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;cp.neoplaygrounds.com. IN A

;; ANSWER SECTION:
cp.neoplaygrounds.com. 86400 IN CNAME 178.238.227.167.neoplaygrounds.com.

;; AUTHORITY SECTION:
neoplaygrounds.com. 38400 IN SOA ns1.neoplaygrounds.com. ns2.neoplaygrounds.com. 2006081401 28800 3600 604800 38400

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sun Oct 14 18:37:22 2012
;; MSG SIZE rcvd: 113

routers 10-14-2012 07:42 AM

look at this

[rou@mga ~]$ dig neoplaygrounds.com in ns

; <<>> DiG 9.9.1-P4 <<>> neoplaygrounds.com in ns
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6825
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;neoplaygrounds.com. IN NS

;; ANSWER SECTION:
neoplaygrounds.com. 86400 IN NS ns1.no1http.com.
neoplaygrounds.com. 86400 IN NS ns2.no1http.com.
----------------

[rou@mga ~]$ nslookup cp.neoplaygrounds.com ns1.no1http.com
Server: ns1.no1http.com
Address: 91.215.156.61#53

** server can't find cp.neoplaygrounds.com: NXDOMAIN

Anderl 10-14-2012 07:50 AM

Quote:

Originally Posted by routers (Post 4805324)
look at this

[rou@mga ~]$ dig neoplaygrounds.com in ns

; <<>> DiG 9.9.1-P4 <<>> neoplaygrounds.com in ns
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6825
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;neoplaygrounds.com. IN NS

;; ANSWER SECTION:
neoplaygrounds.com. 86400 IN NS ns1.no1http.com.
neoplaygrounds.com. 86400 IN NS ns2.no1http.com.
----------------

[rou@mga ~]$ nslookup cp.neoplaygrounds.com ns1.no1http.com
Server: ns1.no1http.com
Address: 91.215.156.61#53

** server can't find cp.neoplaygrounds.com: NXDOMAIN

I can't understand what that means ( I mean, I understand that cp.neoplaygrounds.com cannot be found but I can't understand why that ), what can be the problem?

routers 10-14-2012 08:18 AM

the domain neoplaygrounds.com is registered to work only with ns1.no1http.com
which is not ns1.neoplaygrounds.com

what you have to do is contact registra ask them to point that domain to your
new dns server

after that only you can check the problem one by one

Anderl 10-14-2012 08:28 AM

Quote:

Originally Posted by routers (Post 4805341)
the domain neoplaygrounds.com is registered to work only with ns1.no1http.com
which is not ns1.neoplaygrounds.com

what you have to do is contact registra ask them to point that domain to your
new dns server

after that only you can check the problem one by one

"that domain" - What domain? neoplaygrounds.com or the nameserver ns1.no1http.com?

ns1.no1http.com
ns2.no1http.com

Both are from the server company, not from the registrar. The server company told me that I had to create a DNS server by myself.

routers 10-14-2012 08:43 AM

yeah that is right you have to create your own,
but they didnt tell you which is you need to inform them
after you done it

so please checking with "whois" command mostly available for linux system
otherwise you have to execute yum install jwhois (for RH family)

Anderl 10-14-2012 08:50 AM

Quote:

Originally Posted by routers (Post 4805341)
the domain neoplaygrounds.com is registered to work only with ns1.no1http.com
which is not ns1.neoplaygrounds.com

what you have to do is contact registra ask them to point that domain to your
new dns server

after that only you can check the problem one by one

"neoplaygrounds.com" is already poiting to the machine, I don't see what you mean by "point to the DNS server" ._. The domain itself works, only cp.neoplaygrounds.com doesn't.

routers 10-14-2012 08:56 AM

haha so fast you reply me ok then look here

please run whois so you will get like this

[rou@mga ~]$ whois neoplaygrounds.com |grep nameserver
nameserver: ns1.no1http.com
nameserver: ns2.no1http.com

for you please run "whois neoplaygrounds.com"

you have to make change on the domain registra first for nameserver
then all others A record will work

need to change to
ns1.neoplaygrounds.com
ns2.neoplaygrounds.com

until that, your problem will not solve

Anderl 10-14-2012 09:02 AM

Quote:

Originally Posted by routers (Post 4805362)
haha so fast you reply me ok then look here

please run whois so you will get like this

[rou@mga ~]$ whois neoplaygrounds.com |grep nameserver
nameserver: ns1.no1http.com
nameserver: ns2.no1http.com

for you please run "whois neoplaygrounds.com"

you have to make change on the domain registra first for nameserver
then all others A record will work

need to change to
ns1.neoplaygrounds.com
ns2.neoplaygrounds.com

until that, your problem will not solve

Oh, ok. Now I understood you. I'll do this and then I'll get back. It will start working after propagation of nameserver change? By the way, what should I put in nameserver IP? The IP of my machine, the IP of the answer from "dig ns1.neoplaygrounds.com" or the ones that are in /etc/resolv.conf?

I'm sorry for all these dumb questions, I'm starting with domain names now...

routers 10-14-2012 09:16 AM

for /etc/resolv.conf in the server
just need to have as below
nameserver 127.0.0.1

the thing you need to submit to them is

ns1.neoplaygrounds.com ns1_ip_address
ns2.neoplaygrounds.com ns2_ip_address

however once changed in the whois
please allow 72 hours for propagation :)

Anderl 10-14-2012 09:38 AM

Quote:

Originally Posted by routers (Post 4805373)
for /etc/resolv.conf in the server
just need to have as below
nameserver 127.0.0.1

the thing you need to submit to them is

ns1.neoplaygrounds.com ns1_ip_address
ns2.neoplaygrounds.com ns2_ip_address

however once changed in the whois
please allow 72 hours for propagation :)

I still didn't get that. What is the nameserver's IP? The machine's IP?

routers 10-14-2012 09:48 AM

Quote:

Originally Posted by Anderl (Post 4805393)
I still didn't get that. What is the nameserver's IP? The machine's IP?

the ip is the machine ip you install bind
if you have 2 ip in the machine then submit both ip
one become ns1 and the other one become ns2

if you have another machine want to become ns2 is more welcome
mean you have ns1 and ns2 from diffrent machine this way more better :)

Anderl 10-14-2012 09:58 AM

Quote:

Originally Posted by routers (Post 4805399)
the ip is the machine ip you install bind
if you have 2 ip in the machine then submit both ip
one become ns1 and the other one become ns2

if you have another machine want to become ns2 is more welcome
mean you have ns1 and ns2 from diffrent machine this way more better :)

Okay, thank you for everything.

Anderl 10-14-2012 12:05 PM

It is now working but it is redirecting to main path instead of the path that I've set on httpd.conf, what can I do?

routers 10-14-2012 12:15 PM

looks good :)

Domain Name: NEOPLAYGROUNDS.COM
Registrar: INSTRA CORPORATION PTY, LTD.
Whois Server: whois.instra.net
Referral URL: http://www.instra.com
Name Server: NS1.NEOPLAYGROUNDS.COM
Name Server: NS2.NEOPLAYGROUNDS.COM

however remember to hold your time for propagation

Anderl 10-14-2012 12:29 PM

Quote:

Originally Posted by routers (Post 4805483)
looks good :)

Domain Name: NEOPLAYGROUNDS.COM
Registrar: INSTRA CORPORATION PTY, LTD.
Whois Server: whois.instra.net
Referral URL: http://www.instra.com
Name Server: NS1.NEOPLAYGROUNDS.COM
Name Server: NS2.NEOPLAYGROUNDS.COM

however remember to hold your time for propagation

I know it's working already. The problem is that cp.neoplaygrounds.com redirects to the main path ( /var/www/ ) and not to the custom path I've set in httpd.conf. What can I do?

routers 10-14-2012 12:29 PM

i try to edit the page before but problem with this LQ now extra info for you
your dns looks good


[rou@mga ~]$ nslookup cp.neoplaygrounds.com 178.238.227.167
Server: 178.238.227.167
Address: 178.238.227.167#53

Name: cp.neoplaygrounds.com
Address: 178.238.227.167


its resolved :)

Anderl 10-14-2012 12:34 PM

Quote:

Originally Posted by routers (Post 4805494)
i try to edit the page before but problem with this LQ now extra info for you
your dns looks good


[rou@mga ~]$ nslookup cp.neoplaygrounds.com 178.238.227.167
Server: 178.238.227.167
Address: 178.238.227.167#53

Name: cp.neoplaygrounds.com
Address: 178.238.227.167


its resolved :)

I think you didn't understand yet the problem: The problem is that cp.neoplaygrounds.com redirects to /var/www/ and not to /var/www/cp/www/. Do you understand now?

routers 10-14-2012 12:38 PM

Quote:

Originally Posted by Anderl (Post 4805498)
I think you didn't understand yet the problem: The problem is that cp.neoplaygrounds.com redirects to /var/www/ and not to /var/www/cp/www/. Do you understand now?

yeah i understand i show u what i got

"Oops! Google Chrome could not find cp.neoplaygrounds.com"

this is happen when your dns just join global registry, please hold your time

however you can paste the httpd.conf container for that cp let me see

Anderl 10-14-2012 12:46 PM

Quote:

Originally Posted by routers (Post 4805504)
yeah i understand i show u what i got

"Oops! Google Chrome could not find cp.neoplaygrounds.com"

this is happen when your dns just join global registry, please hold your time

however you can paste the httpd.conf container for that cp let me see

Oh, okay.

Quote:

however you can paste the httpd.conf container for that cp let me see
You mean, paste the httpd.conf code here for you to see it? Sure:

Quote:

Listen 90
NameVirtualHost *

<VirtualHost *>
ServerName neoplaygrounds.com
DocumentRoot /var/www/
</VirtualHost>

<VirtualHost *>
ServerName cp.neoplaygrounds.com
DocumentRoot /var/www/cp/www
</VirtualHost>
I got to change port in 'Listen 80' because with port 80 I got error of Apache.

routers 10-14-2012 12:53 PM

Quote:

Originally Posted by Anderl (Post 4805510)
Oh, okay.



You mean, paste the httpd.conf code here for you to see it? Sure:



I got to change port in 'Listen 80' because with port 80 I got error of Apache.

i think you need to settle this one first dont be hurry
can you show me this result

# cat httpd.conf |grep 80
then we go one by one

Anderl 10-14-2012 12:59 PM

Quote:

Originally Posted by routers (Post 4805518)
i think you need to settle this one first dont be hurry
can you show me this result

# cat httpd.conf |grep 80
then we go one by one

Nothing shows, I've tried that before.

routers 10-14-2012 01:01 PM

ok try now change back to 80 then stop and start apache, any error please post

Anderl 10-14-2012 01:03 PM

Quote:

Restarting web server: apache2 ... waiting (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
failed!
I get this.

routers 10-14-2012 01:04 PM

okeh something is using the port now execute this

# netstat -tanp |grep 80
show the output

Anderl 10-14-2012 01:07 PM

Nothing appears too.

routers 10-14-2012 01:12 PM

off iptables if you on
then execute
# setenforce 0

that 0 is 0123 not Orange

then start apache

Anderl 10-14-2012 01:13 PM

Quote:

Originally Posted by routers (Post 4805534)
off iptables if you on
then execute
# setenforce 0

that 0 is 0123 not Orange

then start apache

I didn't get that.

"off iptables if you on" - Disable iptables if it's on?
"then execute
# setenforce 0" - Where? Shell file? Terminal? I don't really get that.

routers 10-14-2012 01:19 PM

yeah everything in shell

1) # /sbin/service iptables off
2) # setenforce 0
3) # /sbin/service httpd start

Anderl 10-14-2012 01:21 PM

Quote:

Originally Posted by routers (Post 4805539)
yeah everything in shell

1) # /sbin/service iptables off
2) # setenforce 0
3) # /sbin/service httpd start

My system is Debian, not CentOS :p

routers 10-14-2012 01:24 PM

okeh no issue
# setenforce 0
# /etc/init.d/httpd start

Anderl 10-14-2012 01:29 PM

Quote:

Originally Posted by routers (Post 4805542)
okeh no issue
# setenforce 0
# /etc/init.d/httpd start

As I said, my system is Debian. There's no "setenforce" nor Apache2 is called HTTPD xD ( but that I can fix )

routers 10-14-2012 01:46 PM

my god, i also dont have setenforce ( mageia linux desktop)
for this moment i think need to wait some deb admin to help you on the port 80
since its unable to find with cmd netstat

mustbe something is blocking from internal system which i am not familiar with that
or you maybe need to come out with new topic about this port issue please define debian on your topic

Snark1994 10-15-2012 02:50 AM

Quote:

Originally Posted by Anderl (Post 4805510)
I got to change port in 'Listen 80' because with port 80 I got error of Apache.

I'm almost certain that this is a bad idea - as far as I understand it, this means that no web browser will connect to your website by default, because they will try to connect with port 80.

I think a more likely fix is to change it back to 'listen 80' and find and kill the process which is binding to 80 already. http://www.linuxquestions.org/questi...7/#post2474057 talks of the same problem (ey have got a subdomain setup too) and mentions as a fix removing the 'listen' line altogether - which you could try, but as ey mention in their post, I don't know whether that's just a kludge.

To work out what's listening on what port, run:

Code:

sudo netstat -ltnup
My output looks like:Active Internet connections (only servers)
Code:

Proto Recv-Q Send-Q Local Address          Foreign Address        State      PID/Program name   
tcp        0      0 127.0.0.1:31416        0.0.0.0:*              LISTEN      351/boinc_client   
tcp        0      0 0.0.0.0:17500          0.0.0.0:*              LISTEN      2293/dropbox       
tcp6      0      0 :::80                  :::*                    LISTEN      5651/httpd         
udp        0      0 0.0.0.0:17500          0.0.0.0:*                          2293/dropbox       
udp        0      0 172.16.112.40:123      0.0.0.0:*                          784/ntpd           
udp        0      0 127.0.0.1:123          0.0.0.0:*                          784/ntpd           
udp        0      0 0.0.0.0:123            0.0.0.0:*                          784/ntpd           
udp6      0      0 ::1:123                :::*                                784/ntpd           
udp6      0      0 fe80::224:1dff:fe84:123 :::*                                784/ntpd           
udp6      0      0 :::123                  :::*                                784/ntpd

so you can see httpd (apache for you) listening on port 80 (the :::80)

EDIT: Also just found the docs for the VirtualHost directive: http://httpd.apache.org/docs/2.2/vhosts/examples.html the 'listen' line seems to be a good'un, but it may be worthwhile comparing the relevant sections of your httpd.conf...

Hope this helps,

Anderl 10-15-2012 08:26 AM

Quote:

Originally Posted by Snark1994 (Post 4805911)
I'm almost certain that this is a bad idea - as far as I understand it, this means that no web browser will connect to your website by default, because they will try to connect with port 80.

I think a more likely fix is to change it back to 'listen 80' and find and kill the process which is binding to 80 already. http://www.linuxquestions.org/questi...7/#post2474057 talks of the same problem (ey have got a subdomain setup too) and mentions as a fix removing the 'listen' line altogether - which you could try, but as ey mention in their post, I don't know whether that's just a kludge.

To work out what's listening on what port, run:

Code:

sudo netstat -ltnup
My output looks like:Active Internet connections (only servers)
Code:

Proto Recv-Q Send-Q Local Address          Foreign Address        State      PID/Program name   
tcp        0      0 127.0.0.1:31416        0.0.0.0:*              LISTEN      351/boinc_client   
tcp        0      0 0.0.0.0:17500          0.0.0.0:*              LISTEN      2293/dropbox       
tcp6      0      0 :::80                  :::*                    LISTEN      5651/httpd         
udp        0      0 0.0.0.0:17500          0.0.0.0:*                          2293/dropbox       
udp        0      0 172.16.112.40:123      0.0.0.0:*                          784/ntpd           
udp        0      0 127.0.0.1:123          0.0.0.0:*                          784/ntpd           
udp        0      0 0.0.0.0:123            0.0.0.0:*                          784/ntpd           
udp6      0      0 ::1:123                :::*                                784/ntpd           
udp6      0      0 fe80::224:1dff:fe84:123 :::*                                784/ntpd           
udp6      0      0 :::123                  :::*                                784/ntpd

so you can see httpd (apache for you) listening on port 80 (the :::80)

EDIT: Also just found the docs for the VirtualHost directive: http://httpd.apache.org/docs/2.2/vhosts/examples.html the 'listen' line seems to be a good'un, but it may be worthwhile comparing the relevant sections of your httpd.conf...

Hope this helps,

Nothing using port 80. If I remove Listen 80 and set NameVirtualHost *:80 and <VirtualHost *:80> I get this:

Quote:

Starting web server: apache2[Mon Oct 15 19:27:28 2012] [warn] NameVirtualHost *:80 has no VirtualHosts
.

Snark1994 10-16-2012 03:50 AM

Hm. Well, it sounds like we're getting closer... Can you post the relevant section of httpd.conf as it currently looks?


All times are GMT -5. The time now is 05:06 PM.