set php.ini to run over a ssl connection help needed.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
hairytea
Forum Commoner
Posts: 92
Joined: Mon Feb 04, 2008 8:31 am

set php.ini to run over a ssl connection help needed.

Post by hairytea »

I want to be able to set my apache to run over ssl as my isp has closed down the old smtp server and created a new one using ssl connection.

[mail function]
; For Win32 only.
SMTP = smtp.tools.sky.com
smtp_port = 465

; For Win32 only.
;sendmail_from = xxxxxxxxxxxx

does anyone know what additional code i need to add to tell apache that this is going via an ssl connection?

Thanks
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: set php.ini to run over a ssl connection help needed.

Post by RobertGonzalez »

PHP has nothing to do with serving files with Apache over SSL. You need to setup a directive in your Apache configuration file to tell it to listen on port 443 (or whatever other secure port you want to use) and set up your SSL keys on that port. You would also set up a directory root path, server name and perhaps a server alias for the virtual host entry you make to serve up secure files.
hairytea
Forum Commoner
Posts: 92
Joined: Mon Feb 04, 2008 8:31 am

Re: set php.ini to run over a ssl connection help needed.

Post by hairytea »

Everah wrote:PHP has nothing to do with serving files with Apache over SSL. You need to setup a directive in your Apache configuration file to tell it to listen on port 443 (or whatever other secure port you want to use) and set up your SSL keys on that port. You would also set up a directory root path, server name and perhaps a server alias for the virtual host entry you make to serve up secure files.

ok ok i can go to my httpd.default file in apache and tell it to listen on port 465 as opposed to port 80!

The resy just flew over my head :?

(and set up your SSL keys on that port. You would also set up a directory root path, server name and perhaps a server alias for the virtual host entry you make to serve up secure files.)
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: set php.ini to run over a ssl connection help needed.

Post by RobertGonzalez »

SSL requires SSL encryption keys. I set up my SSL server as a virtual host on my Apache install on port 443. I then took all incoming port 80 requests and 302'd them to the secure server. So in effect I created an entire virtual host to handle the SSL traffic and closed requests to port 80.

This is not necessarily the way you want to do things, but you are going to have to start by setting up your server to handle SSL encrypted requests and by telling the server from where you want those requests to be served.

Does that make a little more sense?
Post Reply