Forum Moderators: coopster

Message Too Old, No Replies

Questions about Getting php to work with modssl

         

scratch

7:34 pm on Jun 30, 2003 (gmt 0)

10+ Year Member



Am trying to get a secure page using php on my development system.
It's a powerbook running apache, php

I've created my own certificate per apple's developer page.

[127.0.0.1...] works
[127.0.0.1...]

This makes me think that modssl is working

however php pages do not work (as in the following)
[127.0.0.1...]

I adjusted the following directive to have php in it but it did not help
<Files ~ "\.(cgi¦shtml¦phtml¦php4?¦php?¦php3?)$">
SSLOptions +StdEnvVars
</Files>
commenting it out made it work however

What is this doing, is this going to cause problems down the road.
I would like to replicate my developmental server down the road as a production server.

daisho

4:24 am on Jul 2, 2003 (gmt 0)

10+ Year Member



This doesn't have much to do with php but has more to do with apache.

Make sure you have a <VirtualHost _default_:443> or <VirtualHost 127.0.0.1:443> directive block in your httpd.conf file. That is a block to setup a secure virtual server.

Also this block should contain the following directives:

SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile /path/to/server.crt
SSLCertificateKeyFile /path/to/server.key

along with any other VirtualHost directives that you want. The SSLCipherSuite may be optional and could be different depending on your compile options.

The <FILES> directive in your post simply tells apache to set the SSL environment variables for certain types of files. This just allows PHP and other scripts to see that SSL is running. Since this takes extra time it's only done on files that could possibly use them. Ie since .html files have no scripting power there is no point in setting the environment variables.

If you are still having problems after setting up this virtualhost check your error log to see what apache is saying.

daisho.