Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 23rd November 2006, 06:58
Boothkicker Boothkicker is offline
Junior Member
 
Join Date: Nov 2006
Location: Louisiana, USA
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Boothkicker
Default Url Apache?

Hello all! I am new to forum and this if my first post. I know this is a great site so I decided to join in on the forums.

Here is my problem.

I am running a Debian Linux server (used perfect debian install howto) and apache web server. I have 2 web sites that I am serving.
1: www.boothkicker.com and
2. www.bristleridgeacademy.com

boothkicker.com is my primary page and the first one I set up. When I go to the site with a web browser "www.boothkicker.com" appears in url box. But when i go to "www.bristleridgeacademy.com" the ip address and the folder for web page is shown in url box. How can I fix this so that when the page is visited, "www.bristleridgeacademy.com" is shown?

In /etc/apache2/sites-enabled/000-default I have the following:

<VirtualHost *>
ServerName boothkicker.com
ServerAdmin boothkicker@boothkicker.com
#Local address no port
DocumentRoot /home/cody/public_html
#directory to launch from
ServerName www.boothkicker.com
#www.servername.com
</VirtualHost>


<VirtualHost *>
ServerName bristleridgeacademy.com
DocumentRoot /home/dak/public_html
ServerName www.bristleridgeacademy.com
</VirtualHost>

Thank you for any help!!!

Last edited by Boothkicker; 24th November 2006 at 06:29.
Reply With Quote
Sponsored Links
  #2  
Old 24th November 2006, 15:19
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Quote:
Originally Posted by Boothkicker
In /etc/apache2/sites-enabled/000-default I have the following:

<VirtualHost *>
ServerName boothkicker.com
ServerAdmin boothkicker@boothkicker.com
#Local address no port
DocumentRoot /home/cody/public_html
#directory to launch from
ServerName www.boothkicker.com
#www.servername.com
</VirtualHost>


<VirtualHost *>
ServerName bristleridgeacademy.com
DocumentRoot /home/dak/public_html
ServerName www.bristleridgeacademy.com
</VirtualHost>

Thank you for any help!!!
Please change it to

Code:
NameVirtualHost 1.2.3.4

<VirtualHost 1.2.3.4>
        ServerName boothkicker.com
        ServerAdmin boothkicker@boothkicker.com
         #Local address no port
        DocumentRoot /home/cody/public_html
         #directory to launch from
        ServerName www.boothkicker.com
         #www.servername.com
</VirtualHost>


<VirtualHost 1.2.3.4>
        ServerName bristleridgeacademy.com
       DocumentRoot /home/dak/public_html
        ServerName www.bristleridgeacademy.com
</VirtualHost>
where 1.2.3.4 is your system's IP address (you must see it in the output of
Code:
 ifconfig
). Restart Apache afterwards.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 24th November 2006, 16:18
Boothkicker Boothkicker is offline
Junior Member
 
Join Date: Nov 2006
Location: Louisiana, USA
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Boothkicker
Default

Thank you for your reply, falko.

When I did as you instructed me, I received this after restarting apache:

server1:/etc/apache2/sites-enabled# /etc/init.d/apache2 restart
Forcing reload of web server: Apache2[Fri Nov 24 09:16:46 2006] [warn] VirtualHost 192.168.0.101:0 overlaps with VirtualHost 192.168.0.101:0, the first has precedence, perhaps you need a NameVirtualHost directive
[Fri Nov 24 09:16:46 2006] [warn] VirtualHost 192.168.0.101:0 overlaps with VirtualHost 192.168.0.101:0, the first has precedence, perhaps you need a NameVirtualHost directive
.

Any suggestions? (Sorry, I'm a newb)
Reply With Quote
  #4  
Old 25th November 2006, 13:46
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Can you post your new configuration here? What's the output of
Code:
ifconfig
?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 25th November 2006, 16:46
Boothkicker Boothkicker is offline
Junior Member
 
Join Date: Nov 2006
Location: Louisiana, USA
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Boothkicker
Default

/etc/apache2/sites-enabled/000-default contains this text:
NameVirtualHost 192.168.0.101

<VirtualHost 192.168.0.101>
ServerName boothkicker.com
ServerAdmin boothkicker@boothkicker.com
#Local address no port
DocumentRoot /home/cody/public_html
#directory to launch from
ServerName www.boothkicker.com
#www.servername.com
</VirtualHost>



<VirtualHost 192.168.0.101>
ServerName bristleridgeacademy.com
DocumentRoot /home/dak/public_html
ServerName www.bristleridgeacademy.com
</VirtualHost>



#<VirtualHost *>
# ServerName securitycontrol.biz
# ServerAdmin boothkicker@boothkicker.com
#Local address no port
# DocumentRoot /home/sce/public_html
#directory to launch from
# ServerName www.securitycontrol.biz
#www.servername.com
#</VirtualHost>


The last virtual host is another site that I'm trying to server, but I have some nameserver stuff I have to figure out for it. That is why it is commented out.


And the output of ifconfig is:
server1:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:16:EC:56:92:95
inet addr:192.168.0.101 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:515767 errors:0 dropped:0 overruns:0 frame:0
TX packets:101214 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:153664537 (146.5 MiB) TX bytes:48598126 (46.3 MiB)
Interrupt:11 Base address:0xe400

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1470 errors:0 dropped:0 overruns:0 frame:0
TX packets:1470 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:237220 (231.6 KiB) TX bytes:237220 (231.6 KiB)

Thank you
Reply With Quote
  #6  
Old 26th November 2006, 15:46
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Quote:
Originally Posted by Boothkicker
/etc/apache2/sites-enabled/000-default contains this text:
NameVirtualHost 192.168.0.101

<VirtualHost 192.168.0.101>
ServerName boothkicker.com
ServerAdmin boothkicker@boothkicker.com
#Local address no port
DocumentRoot /home/cody/public_html
#directory to launch from
ServerName www.boothkicker.com
#www.servername.com
</VirtualHost>



<VirtualHost 192.168.0.101>
ServerName bristleridgeacademy.com
DocumentRoot /home/dak/public_html
ServerName www.bristleridgeacademy.com
</VirtualHost>



#<VirtualHost *>
# ServerName securitycontrol.biz
# ServerAdmin boothkicker@boothkicker.com
#Local address no port
# DocumentRoot /home/sce/public_html
#directory to launch from
# ServerName www.securitycontrol.biz
#www.servername.com
#</VirtualHost>
I'm sorry, you're on Apache2, so it must be
Code:
NameVirtualHost 1.2.3.4:80

<VirtualHost 1.2.3.4:80>
        ServerName boothkicker.com
        ServerAdmin boothkicker@boothkicker.com
         #Local address no port
        DocumentRoot /home/cody/public_html
         #directory to launch from
        ServerName www.boothkicker.com
         #www.servername.com
</VirtualHost>


<VirtualHost 1.2.3.4:80>
        ServerName bristleridgeacademy.com
       DocumentRoot /home/dak/public_html
        ServerName www.bristleridgeacademy.com
</VirtualHost>
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 26th November 2006, 15:53
Boothkicker Boothkicker is offline
Junior Member
 
Join Date: Nov 2006
Location: Louisiana, USA
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Boothkicker
Default

I added ":80" to the three ip addresses but it still changes to the ip address when you go to the address: www.bristleridgeacademy.com

I purchases the domains through godaddy.com. I set the domain forwarding to 70.115.60.162/~dak. Is that what it should be set at for the above address? That is where the pages are stored.

Last edited by Boothkicker; 26th November 2006 at 15:55.
Reply With Quote
  #8  
Old 27th November 2006, 14:16
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Quote:
Originally Posted by Boothkicker
I purchases the domains through godaddy.com. I set the domain forwarding to 70.115.60.162/~dak. Is that what it should be set at for the above address? That is where the pages are stored.
Do not forward the domain because then name-based vhosts don't work. You must point the DNS records of the domain directly to your server.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #9  
Old 29th November 2006, 04:44
Boothkicker Boothkicker is offline
Junior Member
 
Join Date: Nov 2006
Location: Louisiana, USA
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Boothkicker
Default

Okay, I got it to somewhat work now. When you go to www.bristleridgeacademy.com the correct url is shown, but if you go to bristleridgeacademy.com (without www) it is directed to my boothkicker page but bristleridgeacademy.com is shown for url.

How do I configure it so that bristleridgeacademy.com is directed to correct page?
Reply With Quote
  #10  
Old 29th November 2006, 17:03
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
 
Default

Add a ServerAlias line to the vhost, e.g. like this:

Code:
<VirtualHost 1.2.3.4:80>
       DocumentRoot /home/dak/public_html
        ServerName www.bristleridgeacademy.com
        ServerAlias bristleridgeacademy.com
</VirtualHost>
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Centos 4.4 32bit Hangs, High Server load 3cwired_com Server Operation 11 16th November 2006 15:47
Apache with Zabbix, Can't get URL to work stuffman Installation/Configuration 9 6th June 2006 12:20
mod_mono apache 2.2 ColdDoT Server Operation 5 23rd May 2006 02:58
Problem with the installation of Dokeos (LMS) in ISPConfig jofranco General 4 28th April 2006 00:45


All times are GMT +2. The time now is 04:41.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.