httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boyle Owen" <Owen.Bo...@swx.com>
Subject RE: [users@httpd] VirtualHost problem
Date Fri, 24 Jan 2003 15:02:00 GMT
You still need to set up IP-based virtual hosts. E.g.

# Name based HTTP VHs on dir 2 and 4
NameVirtualHost 192.168.0.1:5800 
Listen 192.168.0.1:80
<VirtualHost 192.168.0.1:80>
  ServerName host-dir2
  DocumentRoot /htdocs/dir2
  ...
</VirtualHost>
<VirtualHost 192.168.0.1:80>
  ServerName host-dir4
  DocumentRoot /htdocs/dir4
  ...
</VirtualHost>

# SSL host on dir1
Listen 192.168.0.1:4800
<VirtualHost 192.168.0.1:4800>
  DocumentRoot /htdocs/dir1
  SSLCertificateFile /path/to/cert1 etc.
  ...
</VirtualHost>

# SSL host on dir3
Listen 192.168.0.1:4801
<VirtualHost 192.168.0.1:4801>
  DocumentRoot /htdocs/dir3
  SSLCertificateFile /path/to/cert3 etc.
  ...
</VirtualHost>

Note that the SSL hosts must be on different ports - name based hosting
can't work with SSL.

The mappings now are:

https://host-dir1:4800/file -> /htdocs/dir1/file
http://host-dir2:5800/file -> /htdocs/dir2/file
https://host-dir3:4801/file -> /htdocs/dir3/file
http://host-dir4:5800/file -> /htdocs/dir4/file

Rgds,
Owen Boyle


-----Original Message-----
From: Prpltchkv@aol.com [mailto:Prpltchkv@aol.com]
Sent: Freitag, 24. Januar 2003 14:58
To: users@httpd.apache.org
Subject: Re: [users@httpd] VirtualHost problem


Thanks a lot for your reply.
Sorry i am using AOL thats why the texts not plain.

the actual problem is that both hosts have same DocumentRoot,which is
/user/apache2/htdocs,

eg                             htdocs
                        |         |        |         |
                 dir1        dir2    dir3      dir4

dir1 and dir3  must be secure and dir 2 and dir4 must be unsecure.
There 2 ports:
5800 non-secure port
4800 secure port

if  I am now at http://www... :5800/dir2    and want to get to dir 1 I
have to switch to SSL and change ports , the request should be
https://www... :4800/dir1
How can I achieve this ?

Thanks again


Michael

This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please notify the sender urgently
and then immediately delete the message and any copies of it from your
system. Please also immediately destroy any hardcopies of the message.
You must not, directly or indirectly, use, disclose, distribute, print,
or copy any part of this message if you are not the intended recipient.
The sender's company reserves the right to monitor all e-mail
communications through their networks. Any views expressed in this
message are those of the individual sender, except where the message
states otherwise and the sender is authorised to state them to be the
views of the sender's company. 

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message