LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 11-11-2002, 09:56 PM   #1
5amYan
Member
 
Registered: Apr 2002
Location: The District
Distribution: FreeBSD, OBSD maybe Gentoo and Winblech XP
Posts: 291

Rep: Reputation: 30
running Sol and Apache 1.3.26


Server configuration

I follow this and I get page cannot be displayed as an error. I know the site works when not virtually serving. but whe I write the following to httpd.conf I get anerror for the site I know was working.

# Ensure that Apache listens on port 80
Listen 80

# Listen for virtual host requests on all IP addresses
NameVirtualHost *

<VirtualHost *>
DocumentRoot /www/example1
ServerName www.example1.com

# Other directives here

</VirtualHost>

<VirtualHost *>
DocumentRoot /www/example2
ServerName www.example2.org

# Other directives here

</VirtualHost>

I am actually tucking the doc root in
/server/apache/site1

and making sure all permissions are same.
Am I missing something to make virt hosting work?
 
Old 11-11-2002, 11:42 PM   #2
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
only a couple of things I can see that you may be missing

Document root needs to be an absolute path.

Does /www/example1 folder exist in your root file system?

How are you trying to access it?

ServerName is an extension of your domain

If your webserver DocumentRoot is at mydomain.com

ServerName example1.mydomain.com


point browser to example1.mydomain.com

you will get /www/example1/index.html to load in browser

Last edited by DavidPhillips; 11-11-2002 at 11:44 PM.
 
Old 11-11-2002, 11:46 PM   #3
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
looks like you need this

<VirtualHost *>
DocumentRoot /server/apache/site1
ServerName www.example1.yourdomainname
</VirtualHost>
 
Old 11-12-2002, 12:01 AM   #4
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
you may also want to name the VirtualHost

<VirtualHost www.example1.yourdomainname:443>

you will also need to put it in ssl.conf if you have secure access
put the SSL options in the section with your virtualhost in your ssl.conf

Last edited by DavidPhillips; 11-12-2002 at 12:27 AM.
 
Old 11-12-2002, 12:29 AM   #5
5amYan
Member
 
Registered: Apr 2002
Location: The District
Distribution: FreeBSD, OBSD maybe Gentoo and Winblech XP
Posts: 291

Original Poster
Rep: Reputation: 30
sleepy

I am getting sleepy so I am going to try to answer a couple questions but don't think I will play with the config til tomorrow.

Quote:
Does /www/example1 folder exist in your root file system?
Yes, and it is actually /server/apache/htdocs/site1
Quote:
How are you trying to access it?
web browser outside network.
Quote:
If your webserver DocumentRoot is at mydomain.com

ServerName example1.mydomain.com
My domain is actually at a dynamicdns.org. so I set my domain to theirs.

Now your saqying to replace the <*> with WWW.exampl1.mydynamicdns.org?
I thought the docs said only change it with the IP address and leave the * if using a dynamic service. Sorry I guess I didn't mention the dynamic dns thing earlier.

I give your suggestions a shot tomorrow.

Thanks alot
 
Old 11-12-2002, 12:43 AM   #6
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
Does /www/example1 folder exist in your root file system?

Yes, and it is actually /server/apache/htdocs/site1

it must actually be /www/example1


ok on dynamic,


I was refering to if your.domain.org points to your machines ip address ( aka direct dns )
 
  


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
fed 3 -> Sol jollyjoice Linux - Networking 0 07-08-2005 02:50 PM
what to install sol-10 eutu Solaris / OpenSolaris 1 03-12-2005 03:54 PM
Failed to start apache : Apache does not appear to be running : number11 Slackware 9 02-11-2005 09:51 AM
Sol or SME ? floppywhopper General 7 12-25-2004 01:22 AM
SoL Linux 5amYan Linux - Distributions 2 10-14-2002 11:44 AM


All times are GMT -5. The time now is 04:15 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration