LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-21-2013, 03:19 PM   #1
xmtxm
LQ Newbie
 
Registered: Nov 2011
Posts: 4

Rep: Reputation: Disabled
Subdomain in apache localhost bind9 not working.


My subdomain use to work. However it would direct to thelearningnerd.com..
Now it does not work at all. My subdomain is lifelist.thelearningnerd.com
Many resources says edit the .httacess file. I do not have one in apache2.
I have tried many different things.
In /etc/apache2/sites-available/lifelist.thelearningnerd.db
<VirtualHost *:80>
NameVirtualHost *
ServerAdmin webmaster@localhost
ServerName lifelist.localhost
DocumentRoot /var/www/lifelist.thelearningnerd.com
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/lifelist>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/var/www/lifelist.thelearningnerd.com">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

In my hosts file I have this...
127.0.0.1 localhost
127.0.1.1 julia-OptiPlex-745
127.0.0.1 thelearningnerd.com
127.0.0.1 lifelist.thelearningnerd.com

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Namevirtualhost*
Please help me. I have tried everything. I have expiremented, screamed at the computer.
Thanks,
Julia
 
Old 10-22-2013, 01:42 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,516

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
Hi,

You have defined one vhost (lifelist.localhost) in your configuration,. If you want to use thelearningnerd.com and lifelist.thelearningnerd.com you need to add 2 more vhosts as follows. Also use once NameVirtualHost and change it to to match the vhosts definition:
Code:
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName lifelist.localhost
<snip>
</VirtualHost>
<VirtualHost *:80>
ServerName thelearningnerd.com
...
</VirtualHost>
<VirtualHost *:80>
ServerName lifelist.thelearningnerd.com 
...
</VirtualHost>

Last edited by bathory; 10-22-2013 at 01:45 AM.
 
  


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
[SOLVED] linux(in VirtualBox) apache http://localhost working, but 127.0.0.1 not working zousheng Linux - Newbie 12 02-09-2013 07:21 PM
Configure subdomain alias in bind9 Gianni Valenti Linux - Networking 1 01-12-2012 09:52 AM
[SOLVED] bind9 log full of localhost queries meridius Linux - Server 6 04-05-2011 02:54 PM
Dynamic IP, Bind9, Subdomain Question skorpi0wn Linux - Networking 1 06-04-2009 02:22 PM
BIND9 - adding subdomain yah0m Linux - Networking 3 08-15-2008 08:55 PM


All times are GMT -5. The time now is 02:42 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration