Click to See Complete Forum and Search --> : Apache 2.0 (on MDK 9.1) and directory as https


Nalle
07-22-2003, 12:34 PM
Now, I am programming on my MDK-box happily as ever, when I find that I need to run this application in a https area.

Ive got several name-based virtual domains on the site.

I'm running Apache 2.0.47 on a Mandrake 9.1, server configuration - or custom is more correct.

Now the problem is as follows:

I want /var/www/users/mydirectory/ and it's subdirectories to run as https. I need 64-bits encryption (it must accept 64+ all above). No password will be needed - just encryption.

The rest of the site should be normal http

I've read that name based virtual hosts will have to have '*' as port, so ssl is not possible. I've also read that there are ways around that.

I just don't seem to get the grasp on one thing or another here, so now I need help.

I do not want to change the server before I know I'm not trashing anything, since I'm programming right now and do not have time for troubleshooting.

I really hope for something that I can understand fully or a "cake recipy) (a list on how to do it with inclusion of where I'm gonna put the stuff).

chrism01
07-22-2003, 02:03 PM
Here's an example from my course book:

Listen 10.1.2.3

<VirtualHost 10.1.2.3:443>
ServerAdmin webmaster@example.com
DocumentRoot /home/user/www
ServerName www.example.com
ErrorLog /var/log/httpd/www.example.com-error
TransferLog /var/log/httpd/www.example.com-access
SSLEnable
SSLCertificateFile /etc/httpd/conf/ssl.crt/www.example.com.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/www.example.com.key
</VirtualHost >

<VirtualHost 10.1.2.3:80>
ServerAdmin webmaster@example.com
DocumentRoot /home/user/www
ServerName www.example.com
ErrorLog /var/log/httpd/www.example.com-error
TransferLog /var/log/httpd/www.example.com-access
</VirtualHost >

This was for Apache 1.3, but I'd imagine its prob the same.
HTH

Nalle
07-23-2003, 01:51 AM
I've seen that solution (and a lot of variations of it), but that solution is not usable because I use (and must use) name based virtualhosts.

Following is an actual cut-out from my Vhosts.conf:

*** snip ***

NameVirtualHost *
<VirtualHost *>
DocumentRoot /var/www/html
ServerName nalle.no
</VirtualHost>


<VirtualHost *>
DocumentRoot /var/www/users/nalle
ServerName nalle.nalle.no
</VirtualHost>

<VirtualHost *>
ServerName thor.vadstein.no
ServerAlias thor.nalle.no
DocumentRoot /var/www/users/thor
CustomLog logs/vadstein-access_log common
ErrorLog logs/vadstein-error_log
</VirtualHost>

<VirtualHost *>
DocumentRoot /var/www/users/matata
ServerName matata.nalle.no
CustomLog logs/matata-access_log common
ErrorLog logs/matata-error_log
</VirtualHost>

*** snip ***

Name based virtual hosts will have to use * as port, so one have to work a workarounds of some kind to make it work on 443.

I've learned from reading about it that there indeed is a workaround. It's just that I havent been able to find an example that is understandable to my simple mind.