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 09-08-2011, 03:04 PM   #31
bskrakes
Member
 
Registered: Sep 2006
Location: Canada, Alberta
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251

Rep: Reputation: 32

The reason the you need to change the "ServerName" is because Apache is listening for the request, meaning when someone types one of your websites into their browser (one of your two sites) the browser then goes to your server and requests the appropriate site bassline-madness.co.uk or bm-filehost.co.cc.... Let me know once you have changed this in your httpd.conf file, don't forget to restart apache =)
 
Old 09-08-2011, 07:34 PM   #32
deanspink1986
Member
 
Registered: Sep 2011
Posts: 32

Original Poster
Rep: Reputation: Disabled
ok right so in the httpd.conf right at bottom in my VH setup bassline-madness.co.uk = servername bassline-madness.co.uk and bm-filehost.co.cc = servername bm-filehost.co.cc is that right and do i have to do anything with /ect/hosts.conf?
 
Old 09-08-2011, 07:39 PM   #33
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,362

Rep: Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377
You'll need to check this page https://httpd.apache.org/docs/2.2/vhosts/, then drill down to next page https://httpd.apache.org/docs/2.2/vh...ame-based.html & see ServerName & ServerAlias directives.
 
Old 09-08-2011, 07:40 PM   #34
deanspink1986
Member
 
Registered: Sep 2011
Posts: 32

Original Poster
Rep: Reputation: Disabled
ok cheers
 
Old 09-09-2011, 03:50 AM   #35
deanspink1986
Member
 
Registered: Sep 2011
Posts: 32

Original Poster
Rep: Reputation: Disabled
woo hoo it works thankyou very much for your help
 
Old 09-09-2011, 07:40 PM   #36
bskrakes
Member
 
Registered: Sep 2006
Location: Canada, Alberta
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251

Rep: Reputation: 32
Glad it worked! Have a great weekend, post back if you need anymore help.

Last edited by bskrakes; 09-09-2011 at 07:42 PM.
 
Old 09-11-2011, 06:01 AM   #37
deanspink1986
Member
 
Registered: Sep 2011
Posts: 32

Original Poster
Rep: Reputation: Disabled
hi im back haha still working but not adding www. to begining of url do you know why?
 
Old 09-11-2011, 06:01 PM   #38
bskrakes
Member
 
Registered: Sep 2006
Location: Canada, Alberta
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251

Rep: Reputation: 32
Do you have a DNS records for the www?
 
Old 09-12-2011, 02:46 PM   #39
deanspink1986
Member
 
Registered: Sep 2011
Posts: 32

Original Poster
Rep: Reputation: Disabled
good point lol no i will set that up thanks again
 
Old 09-13-2011, 04:47 PM   #40
bskrakes
Member
 
Registered: Sep 2006
Location: Canada, Alberta
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251

Rep: Reputation: 32
no worries, i love this kind of stuff! i remember when i first started out, man i pulled my hair out. thank god i didn't get any gray hairs!

anyway dns records you probably should have:

Quote:
yourdomain.com
www.yourdomain.com
ftp.yourdomain.com
ns1.yourdomain.com
ns2.yourdomain.com
mx.yourdomain.com (for email)
i believe you already have an "a record" and "pointer (prt) records."

Last edited by bskrakes; 09-13-2011 at 04:49 PM.
 
Old 09-13-2011, 05:31 PM   #41
deanspink1986
Member
 
Registered: Sep 2011
Posts: 32

Original Poster
Rep: Reputation: Disabled
hi mate tried a different approach and used a tut for ispconfig and no didnt have them haha my a record is hosted on zonomi dont no how to set rest up lol
 
Old 09-13-2011, 06:03 PM   #42
deanspink1986
Member
 
Registered: Sep 2011
Posts: 32

Original Poster
Rep: Reputation: Disabled
starting again lol ispconfig3 naffed my apache up so fresh install without ispconf could you guide me on how to setup dns if you dont mind that is the point i always struggle with dont quite understand it
 
Old 09-13-2011, 06:59 PM   #43
deanspink1986
Member
 
Registered: Sep 2011
Posts: 32

Original Poster
Rep: Reputation: Disabled
by the way my isp only has 1 dns ip does that matter?
 
Old 09-14-2011, 04:50 AM   #44
deanspink1986
Member
 
Registered: Sep 2011
Posts: 32

Original Poster
Rep: Reputation: Disabled
ok i have started again but having same problem again with NVH heres my config
Quote:
<VirtualHost *:80>
ServerAdmin dean-s@live.co.uk
DocumentRoot /var/www/html/mycheaphosting
ServerName mycheaphosting.co.uk
ErrorLog /var/www/logs/mycheaphosting/log
CustomLog /var/www/logs/mycheaphosting/custom/log common
</VirtualHost>



<VirtualHost *:80>
ServerAdmin dean-s@live.co.uk
DocumentRoot /var/www/html/dean-s
ServerName bassline-madness.co.uk
ErrorLog /var/www/logs/dean-s/log
CustomLog /var/www/logs/dean-s/custom/log common
</VirtualHost>
 
Old 09-14-2011, 11:40 AM   #45
bskrakes
Member
 
Registered: Sep 2006
Location: Canada, Alberta
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251

Rep: Reputation: 32
When you say the same problem what do you mean, error starting apache? I've checked both of your sites and the second site: bassline-madness.co.uk has a database error, doesn't appear to be related to apache. Did you changed anything with the virtual host after you configured the site, sometimes when you change something after you have run the setup it will break file paths.

I need more info regarding the issue your experiencing.
 
  


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
debian lenny - all virtual hosts lead to first virtual host rantastic Linux - Server 2 04-21-2010 09:32 PM
Virtual Hosts ayomacro Linux - Server 1 02-29-2008 06:00 PM
virtual hosts Four Ubuntu 1 03-12-2007 01:30 AM
vsftpd, web uploads, vsftpd virtual users, apache virtual hosts, home directories jerryasher Linux - Software 7 02-18-2007 06:29 AM
virtual hosts... Digital_Err0r Linux - Newbie 25 03-25-2004 03:58 PM


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