LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-23-2015, 05:28 PM   #1
walterbyrd
Member
 
Registered: Apr 2004
Posts: 734

Rep: Reputation: 46
Trying to install Apache2 for *local* network


Using Debian 7 (no systemd) on x86_64. I am not running any DNS. This is a very small home network.


For some reason, apache seems to have a big problem with this (used to be dirt simple).

Here is my host setup in /etc/apache2/sites-available

Code:
<VirtualHost 168.192.1.109:80>
        ServerAdmin admin@localhost
        DocumentRoot /var/www
        ServerName fir
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>
I kept getting the error message:

# NameVirtualHost *:0 has no VirtualHosts


I edited ports.conf and commented out the "NameVirtualHost *" line.

Still get the same error.

Here is my /etc/hosts

Code:
127.0.0.1       localhost
192.168.1.109   fir fir.nuclix
I have shut down the firewall. But the site will not load. It always times out.
 
Old 06-23-2015, 05:35 PM   #2
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,286
Blog Entries: 24

Rep: Reputation: 4238Reputation: 4238Reputation: 4238Reputation: 4238Reputation: 4238Reputation: 4238Reputation: 4238Reputation: 4238Reputation: 4238Reputation: 4238Reputation: 4238
I suspect it is just what the error message says...

Code:
# NameVirtualHost *:0 has no VirtualHosts
I think Apache requires a default VHost - *:80 - to preceed any named VHosts

Code:
<VirtualHost *:80>
... Default vhost spec here...
</VirtualHost>
 
Old 06-23-2015, 06:08 PM   #3
walterbyrd
Member
 
Registered: Apr 2004
Posts: 734

Original Poster
Rep: Reputation: 46
Thank you, but that did not work either.

I am now trying lighttpd, but that is not working either.

Everything always times out. I cannot figure out why. I disabled all firewalls on debian, and on my home router, but nothing works.

I have set up web servers many times before with no problem, but nothing seems to work with Debian 7. Plex will not work either.
 
Old 06-23-2015, 06:41 PM   #4
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,286
Blog Entries: 24

Rep: Reputation: 4238Reputation: 4238Reputation: 4238Reputation: 4238Reputation: 4238Reputation: 4238Reputation: 4238Reputation: 4238Reputation: 4238Reputation: 4238Reputation: 4238
How are you trying to reach it - from LAN or internet, localhost?

Is the machine reachable via ping, for example?
 
Old 06-23-2015, 07:20 PM   #5
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by walterbyrd View Post
Code:
<VirtualHost 168.192.1.109:80>
        ServerName fir.nuclix
Looks like that coulda-shoulda-woulda be fir.nuclix? and the closing
Code:
</VirtualHost>
seems to be 'missing'.

Also this is in the sites-available, have you done an a2ensite on the 'site' to make it enabled?

Can we see the output from
Code:
apache2ctl -S
please?

Last edited by Habitual; 06-23-2015 at 07:26 PM.
 
Old 06-23-2015, 10:37 PM   #6
walterbyrd
Member
 
Registered: Apr 2004
Posts: 734

Original Poster
Rep: Reputation: 46
I am trying to do this on a local machine.

I had a closing </VirtualHost> I just did not want to put all of that in the message - my bad.

I did do a a2ensite, but that did not help.

I cannot do a apache2ctl -S right now since I uninstalled apache2, to try lighttpd. But since lighttpd is not working either I may try apache2 again.

Apache2, Plex, and lighttpd all do the same thing: it tries to load for some time, then times out. This only happens on Debian 7. I got Plex, and lighttpd, working on my bsd box.
 
Old 06-24-2015, 04:46 PM   #7
walterbyrd
Member
 
Registered: Apr 2004
Posts: 734

Original Poster
Rep: Reputation: 46
Okay, apache2 is installed.

Code:
# apache2ctl -S
apache2: Could not reliably determine the server's fully qualified domain name, using fir.nuclix for ServerName
VirtualHost configuration:
168.192.1.109:80       fir (/etc/apache2/sites-enabled/host:1)
Syntax OK
I cannot understand why it keeps insisting on the fully qualified domain name.
 
Old 06-24-2015, 08:12 PM   #8
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by walterbyrd View Post
Okay, apache2 is installed.

Code:
# apache2ctl -S
apache2: Could not reliably determine the server's fully qualified domain name, using fir.nuclix for ServerName
VirtualHost configuration:
168.192.1.109:80       fir (/etc/apache2/sites-enabled/host:1)
Syntax OK
I cannot understand why it keeps insisting on the fully qualified domain name.
just tell apache2 it is localhost using
Code:
echo "ServerName localhost" >> /etc/apache2/apache2.conf
and restart apache2. Should be gone.

I don't believe it's actually cemented to the host name designated in /etc/hosts.
 
Old 06-25-2015, 05:33 AM   #9
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,378

Rep: Reputation: 2755Reputation: 2755Reputation: 2755Reputation: 2755Reputation: 2755Reputation: 2755Reputation: 2755Reputation: 2755Reputation: 2755Reputation: 2755Reputation: 2755
Can I just point out
Code:
<VirtualHost 168.192.1.109:80>

192.168.1.109   fir fir.nuclix
Notice anything ... incompatible... ?
 
  


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
Network install via Kickstart using a (created) local repository (F12-F14) Ronayn Fedora 3 01-06-2011 08:59 AM
install from local network using 5 DVD ISOs theNbomr Debian 12 04-17-2010 12:37 AM
Install Apache on Local Network zdienos Linux - Networking 9 09-16-2006 10:31 AM
9.2 Pro local network install slackaddict SUSE / openSUSE 7 04-01-2005 03:04 AM
apache2 local network problem HermanTheSheep Linux - Networking 4 12-07-2004 07:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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