LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-14-2012, 01:13 PM   #31
Anderl
LQ Newbie
 
Registered: Oct 2012
Posts: 26

Original Poster
Rep: Reputation: Disabled

Quote:
Originally Posted by routers View Post
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.
 
Old 10-14-2012, 01:19 PM   #32
routers
Member
 
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 787
Blog Entries: 6

Rep: Reputation: 75
yeah everything in shell

1) # /sbin/service iptables off
2) # setenforce 0
3) # /sbin/service httpd start
 
Old 10-14-2012, 01:21 PM   #33
Anderl
LQ Newbie
 
Registered: Oct 2012
Posts: 26

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by routers View Post
yeah everything in shell

1) # /sbin/service iptables off
2) # setenforce 0
3) # /sbin/service httpd start
My system is Debian, not CentOS
 
Old 10-14-2012, 01:24 PM   #34
routers
Member
 
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 787
Blog Entries: 6

Rep: Reputation: 75
okeh no issue
# setenforce 0
# /etc/init.d/httpd start
 
Old 10-14-2012, 01:29 PM   #35
Anderl
LQ Newbie
 
Registered: Oct 2012
Posts: 26

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by routers View Post
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 )
 
Old 10-14-2012, 01:46 PM   #36
routers
Member
 
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 787
Blog Entries: 6

Rep: Reputation: 75
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
 
Old 10-15-2012, 02:50 AM   #37
Snark1994
Senior Member
 
Registered: Sep 2010
Distribution: Debian
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
Quote:
Originally Posted by Anderl View Post
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,

Last edited by Snark1994; 10-15-2012 at 02:53 AM.
 
Old 10-15-2012, 08:26 AM   #38
Anderl
LQ Newbie
 
Registered: Oct 2012
Posts: 26

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Snark1994 View Post
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
.
 
Old 10-16-2012, 03:50 AM   #39
Snark1994
Senior Member
 
Registered: Sep 2010
Distribution: Debian
Posts: 1,632
Blog Entries: 3

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


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
CentOS 6.2 - subdomain doesn't work and problems with making VirtualHost Gruszka1 Linux - Server 5 04-07-2012 08:50 AM
Google Hangout doesn't work, and Mplayer doesm't work without -ao alsa flagGoogle H ranban282 Linux - Software 0 02-20-2012 04:23 AM
Keyboard doesn't work right click on mouse doesn't work ramblinrick Linux Mint 2 10-15-2010 01:10 AM
Create webmail subdomain on Plesk master domain. (reserved subdomain) fruitwerks Linux - Server 0 08-11-2010 03:08 PM
logout in x doesn't work and nvidia doesn't boot Meriadoc Linux - Newbie 2 06-18-2004 12:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:44 AM.

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