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-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 06:35 PM.