LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 03-05-2005, 09:48 PM   #1
eckertc1
Member
 
Registered: Feb 2005
Posts: 57

Rep: Reputation: 15
Http Server help


what i have:

I'm running Red Hat 9 with apache 2 and i have a web server set up to host my own site, www.mysite1.com, internally (don't like paying for hosting). everything works perfectly the way i have it set up at the moment.

what i want:

recently i decided to put up a second and possibly a third site, www.mysite2.com & www.mysite3.com, but i have had no success in getting this set up on my server.

I guess what I'm asking for here is, what exactly do i need in order to make virtual hosts work. i have done LOTS of reading on setting up the virtual hosts themselves inside of apache, but they still don't seem to work. would i need to set up my own DNS, or maybe set up some port forwarding in my router that I'm missing, or what.

i think I'm missing something very fundamental here and its preventing my virtual hosts from working. or maybe what I'm trying to do is not even possible on my current set up with only one IP address, i just don't know.

any advice would be great.

sincerely, newb in need
 
Old 03-05-2005, 09:52 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
One IP is no problem: that's the idea behind virtual hosts. What does your httpd.conf look like? And what errors are you getting, if any?
 
Old 03-05-2005, 09:55 PM   #3
eckertc1
Member
 
Registered: Feb 2005
Posts: 57

Original Poster
Rep: Reputation: 15
I dont currently have one set up. everything i did failed so i just finished formating and reinstalling red hat from step 1. now i have my original server set up again in the default settings apache uses for directories and such.

the reason i posted was so i could get an idea of what i need to do before i try to do it this time lol. dont want to start from scrach again if possible.

the main problem i was having when i set it up the first time was that either site i tried to visit would bring up the first site in the Virtual host list. if that helps any

Last edited by eckertc1; 03-05-2005 at 09:56 PM.
 
Old 03-05-2005, 11:21 PM   #4
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Using apache 1.3, the following documentation applies: http://httpd.apache.org/docs/vhosts/
Using apache 2.0, the following documentation applies: http://httpd.apache.org/docs-2.0/vhosts/

If you have questions or would like me to look over your configuration, I'd be glad to help you.
 
Old 03-05-2005, 11:47 PM   #5
eckertc1
Member
 
Registered: Feb 2005
Posts: 57

Original Poster
Rep: Reputation: 15
using the documentation you gave me for apache 2.0 i found this sentence:

"You must first have your DNS server properly configured to map those names to an IP address associated with your server.
"

does this mean i need to run my own DNS and if so how do i go about setting this up.
 
Old 03-06-2005, 12:08 AM   #6
eckertc1
Member
 
Registered: Feb 2005
Posts: 57

Original Poster
Rep: Reputation: 15
heres the Vhosts section from my httpd.conf. maybe this will help shed some light.

### Section 3: Virtual Hosts

NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot /var/www/mysite1/
ServerName www.mysite1.com
ServerAlias mysite1.com *.mysite1.com
</VirtualHost>

<VirtualHost *:80>
DocumentRoot /var/www/mysite2/
ServerName www.mysite2.com
ServerAlias mysite2.com *.mysite2.com
</VirtualHost>

right now if i try to browse to either site i am getting an Error 404
 
Old 03-06-2005, 01:22 AM   #7
eckertc1
Member
 
Registered: Feb 2005
Posts: 57

Original Poster
Rep: Reputation: 15
well i found part of my problem. i had a simple mistake in the directory for document root. fixing that solved my 404 error but i still cant get it to resolve to the correct page. im getting the apache test page for both virtual hosts. so i think this is an issue with setting DNS up correctly.

can anyone help me out with that?? what do i need to do. can i set that up through Godaddy where i have my domains parked or do i need to set up my own DNS.

and if i need to set up my own DNS what kind of DNS exactly do i need.
 
Old 03-06-2005, 02:13 AM   #8
eckertc1
Member
 
Registered: Feb 2005
Posts: 57

Original Poster
Rep: Reputation: 15
one last bit of information that may help. in my /httpd/error_log i find this entry every time i try to access the page.

Permission denied: access to /index.html denied, referer: http://www.mydomain.com/
 
Old 03-06-2005, 02:23 AM   #9
eckertc1
Member
 
Registered: Feb 2005
Posts: 57

Original Poster
Rep: Reputation: 15
Problem solved, im an idiot, ill stop spaming the forum with stupid questions now.

solution was in the file permissions
 
  


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
http proxy server Seiken Slackware 6 12-09-2005 12:03 PM
HTTP server carlosa52 SUSE / openSUSE 1 07-05-2005 10:12 PM
Cant see http server xowl Linux - Networking 6 06-19-2005 12:15 AM
http server help jrmontg Linux - Newbie 2 04-11-2005 01:49 PM
Linux email server and some HTTP server questions Steven6282 Linux - General 7 02-19-2003 03:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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