LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 09-29-2010, 01:08 PM   #16
sunsoft
LQ Newbie
 
Registered: Sep 2010
Posts: 25

Original Poster
Rep: Reputation: 0

How
find the correct IP
 
Old 09-29-2010, 01:12 PM   #17
sunsoft
LQ Newbie
 
Registered: Sep 2010
Posts: 25

Original Poster
Rep: Reputation: 0
How
find the correct IP
 
Old 09-29-2010, 01:22 PM   #18
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
eth0 Link encap:Ethernet HWaddr 00:24:1D:30:7F:3D
UP BROADCAST MULTICAST MTU:1500 Metric:1
...

wlan0 Link encap:Ethernet HWaddr 00:23:CD:CB:9C:5E
inet addr:196.219.240.236 Bcast:196.219.240.239 Mask:255.255.255.248
...
You don't have assign an IP address for your ethernet card, but only for your wireless.
You can use the wlan IP address if you want, or use a wildcard:
Edit /etc/httpd/conf/httpd.conf and use
Code:
NameVirtualHost *:80
and
Code:
<VirtualHost *:80>
...
 
Old 09-29-2010, 01:28 PM   #19
sunsoft
LQ Newbie
 
Registered: Sep 2010
Posts: 25

Original Poster
Rep: Reputation: 0
<VirtualHost 196.219.240.236>
ServerName localhost
DocumentRoot /home
</VirtualHost>

------------------------------
root@nameserver [~]# NameVirtualHost 196.219.240.236:80
bash: NameVirtualHost: command not found
root@nameserver [~]# NameVirtualHost localhost:80
bash: NameVirtualHost: command not found
root@nameserver [~]# <VirtualHost localhost:80>
bash: syntax error near unexpected token `newline'
root@nameserver [~]# <VirtualHost 196.219.240.236:80>
bash: syntax error near unexpected token `newline'
root@nameserver [~]# <196.219.240.236:80>
bash: syntax error near unexpected token `newline'
root@nameserver [~]# <localhost:80>
bash: syntax error near unexpected token `newline'
root@nameserver [~]# localhost:80
bash: localhost:80: command not found
root@nameserver [~]# 196.219.240.236:80
bash: 196.219.240.236:80: command not found
root@nameserver [~]#


root@nameserver [~]# NameVirtualHost *:80
bash: NameVirtualHost: command not found
root@nameserver [~]# <VirtualHost *:80>
bash: syntax error near unexpected token `newline'
root@nameserver [~]#

--------------------
It seems that I do not understand

Last edited by sunsoft; 09-29-2010 at 01:40 PM. Reason: It seems that I do not understand
 
Old 09-29-2010, 01:40 PM   #20
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Well, I've already told you not to be impatient. You should read more carefully what we are telling you to do.

These are not commands. They are apache directives you should change in /etc/httpd/conf/httpd.conf
Open /etc/httpd/conf/httpd.conf, look for NameVirtualHost and edit it to be
Code:
NameVirtualHost *:80
Then in the same /etc/httpd/conf/httpd.conf, edit <VirtualHost 196.219.240.238> and change it to <VirtualHost *:80>
 
Old 09-29-2010, 01:45 PM   #21
sunsoft
LQ Newbie
 
Registered: Sep 2010
Posts: 25

Original Poster
Rep: Reputation: 0
ok

So true or no

<VirtualHost*:80>
ServerName localhost
DocumentRoot /home
</VirtualHost>
 
Old 09-29-2010, 01:48 PM   #22
sunsoft
LQ Newbie
 
Registered: Sep 2010
Posts: 25

Original Poster
Rep: Reputation: 0
root@nameserver [~]# hostname
nameserver.iac.lan
 
Old 09-29-2010, 01:55 PM   #23
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Did you also changed NameVirtualHost as above?
You can also set ServerName to nameserver.iac.lan, but that's not important.
After editing NameVirtualHost (and ServerName if you want) in /etc/httpd/conf/httpd.conf, try to start the service.

If it doesn't start look at /var/log/httpd/error_log
 
Old 09-29-2010, 02:02 PM   #24
sunsoft
LQ Newbie
 
Registered: Sep 2010
Posts: 25

Original Poster
Rep: Reputation: 0
root@nameserver [~]# service httpd start
Starting httpd: httpd: Syntax error on line 11 of /etc/httpd/conf/httpd.conf: Expected </VirtualHost*:80> but saw </VirtualHost>
[FAILED]
root@nameserver [~]# tail -n 10 /var/log/messages
Sep 29 22:00:03 nameserver avahi-daemon[2783]: New relevant interface wlan0.IPv4 for mDNS.
Sep 29 22:00:03 nameserver avahi-daemon[2783]: Joining mDNS multicast group on interface wlan0.IPv4 with address 196.219.240.236.
Sep 29 22:00:03 nameserver avahi-daemon[2783]: Registering new address record for 196.219.240.236 on wlan0.
Sep 29 22:00:03 nameserver avahi-daemon[2783]: New relevant interface wlan0.IPv6 for mDNS.
Sep 29 22:00:03 nameserver avahi-daemon[2783]: Joining mDNS multicast group on interface wlan0.IPv6 with address fe80::223:cdff:fecb:9c5e.
Sep 29 22:00:03 nameserver avahi-daemon[2783]: Registering new address record for fe80::223:cdff:fecb:9c5e on wlan0.
Sep 29 22:00:04 nameserver NetworkManager: <info> (wlan0): device state change: 7 -> 8
Sep 29 22:00:04 nameserver NetworkManager: <info> Policy set 'Sunsoft1' (wlan0) as default for routing and DNS.
Sep 29 22:00:04 nameserver NetworkManager: <info> Activation (wlan0) successful, device activated.
Sep 29 22:00:04 nameserver NetworkManager: <info> Activation (wlan0) Stage 5 of 5 (IP Configure Commit) complete.
root@nameserver [~]#
 
Old 09-29-2010, 02:14 PM   #25
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
You must leave a blank space before the * in <VirtualHost *:80>
 
Old 09-29-2010, 02:19 PM   #26
sunsoft
LQ Newbie
 
Registered: Sep 2010
Posts: 25

Original Poster
Rep: Reputation: 0
<VirtualHost *:80>


root@nameserver [~]# service httpd start
Starting httpd: httpd: apr_sockaddr_info_get() failed for nameserver.iac.lan
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
no listening sockets available, shutting down
Unable to open logs
[FAILED]
root@nameserver [~]#
 
Old 09-29-2010, 02:25 PM   #27
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Doh, I guess nameserver.iac.lan is not your hostname
Use
Code:
ServerName localhost
and see if it works this way
 
Old 09-29-2010, 02:34 PM   #28
sunsoft
LQ Newbie
 
Registered: Sep 2010
Posts: 25

Original Poster
Rep: Reputation: 0
no thing

so
http://www.centos.org/docs/2/rhl-rg-...tualhosts.html

or
http://httpd.apache.org/docs/current/vhosts/mass.html

Last edited by sunsoft; 09-29-2010 at 02:41 PM.
 
Old 09-29-2010, 02:38 PM   #29
sunsoft
LQ Newbie
 
Registered: Sep 2010
Posts: 25

Original Poster
Rep: Reputation: 0
root@nameserver [~]# /etc/init.d/httpd configtest

httpd: apr_sockaddr_info_get() failed for nameserver.iac.lan
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
Syntax OK


root@nameserver [~]# service httpd start

Starting httpd: httpd: apr_sockaddr_info_get() failed for nameserver.iac.lan
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
no listening sockets available, shutting down
Unable to open logs
[FAILED]
root@nameserver [~]#
 
Old 09-29-2010, 04:07 PM   #30
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Could you post httpd.conf?
Use # to put it into CODE tags

### EDIT ###
Please don't cross post. Ask a mod to delete http://www.linuxquestions.org/questi...-httpd-835268/

Last edited by bathory; 09-29-2010 at 04:10 PM.
 
  


Reply



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
httpd will not start gotminein89 Linux - Server 3 08-06-2010 12:03 PM
start httpd en vsftpd at start zerocool22 Linux - Server 11 04-25-2008 07:50 AM
httpd won't start jim.thornton Linux - Newbie 2 01-06-2008 02:57 PM
Failed to start apache :Starting httpd: Syntax error on line 1027 of /etc/httpd/conf/ payjoe Linux - Newbie 3 09-21-2007 07:24 AM
need help with httpd start MaX-PaYnE Linux - Newbie 6 11-29-2006 11:48 PM

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

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