LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   running Sol and Apache 1.3.26 (https://www.linuxquestions.org/questions/linux-software-2/running-sol-and-apache-1-3-26-a-35223/)

5amYan 11-11-2002 09:56 PM

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?

DavidPhillips 11-11-2002 11:42 PM

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

DavidPhillips 11-11-2002 11:46 PM

looks like you need this

<VirtualHost *>
DocumentRoot /server/apache/site1
ServerName www.example1.yourdomainname
</VirtualHost>

DavidPhillips 11-12-2002 12:01 AM

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

5amYan 11-12-2002 12:29 AM

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

DavidPhillips 11-12-2002 12:43 AM

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 )


All times are GMT -5. The time now is 11:44 AM.