Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

using centos OS and apache 2.2.3

my php code is not interpreted over ssl. It renders out the code within the browser. Page works fine under http.

Configuration:

<VirtualHost secure.cognitionsmartsites.com:443> 
  AddType text/html .php 
  AddHandler application/x-httpd-php .php 
  ServerName secure.cognitionsmartsites.com 
  <Directory "/var/www/vhosts/default/htdocs"> 
    Allow from all Options +Indexes 
  </Directory> 
  IndexOptions 
  ServerAlias secure.cognitionsmartsites.com 
  DocumentRoot /var/www/vhosts/default/htdocs 
  SSLEngine On 
  SSLCertificateFile /usr/local/psa/var/certificates/cert.crt 
  SSLCertificateKeyFile /usr/local/psa/var/certificates/private.key 
  SSLCertificateChainFile /usr/local/psa/var/certificates/intermediate.crt 
</VirtualHost>

httpd -S output

VirtualHost configuration:
192.168.0.1:80         siteeditor.vserver.onlinehome-server.info (/etc/httpd/conf.d/zz011_siteeditor.conf:8)
127.0.0.1:80           siteeditor.vserver.onlinehome-server.info (/etc/httpd/conf.d/zz011_siteeditor.conf:8)
74.208.101.55:80       default (/etc/httpd/conf.d/zz010_psa_httpd.conf:48)
74.208.101.55:443      secure.cognitionsmartsites.com (/etc/httpd/conf.d/smartsitessl.conf:3)

wildcard NameVirtualHosts and _default_ servers:
_default_:443          s15441819.onlinehome-server.com (/etc/httpd/conf.d/ssl.conf:81)
*:80                   is a NameVirtualHost
default server s361865982.onlinehome.us (/etc/httpd/conf/httpd.conf:989)
port 80 namevhost s361865982.onlinehome.us (/etc/httpd/conf/httpd.conf:989)

Syntax OK

One other thing is that I can browse to image files under https and they render fine.

share|improve this question
    
Please post the relevant parts of your apache vhost config –  Mathias R. Jessen Apr 9 '13 at 13:23
    
<VirtualHost secure.cognitionsmartsites.com:443> AddType text/html .php AddHandler application/x-httpd-php .php ServerName secure.cognitionsmartsites.com <Directory "/var/www/vhosts/default/htdocs"> Allow from all Options +Indexes </Directory> IndexOptions ServerAlias secure.cognitionsmartsites.com DocumentRoot /var/www/vhosts/default/htdocs SSLEngine On SSLCertificateFile /usr/local/psa/var/certificates/cert.crt SSLCertificateKeyFile /usr/local/psa/var/certificates/private.key SSLCertificateChainFile /usr/local/psa/var/certificates/intermediate.crt </VirtualHost> –  ab2187 Apr 9 '13 at 13:27
    
Thanks for adding the config! Next time it'd be great if you could edit the question instead of pasting it in a comment. I'm fixing it for you now, so hopefully you'll get help quicker. –  Jenny D Apr 9 '13 at 13:43
    
my bad..will edit better from here on out –  ab2187 Apr 9 '13 at 13:44
    
what is the output of "httpd -S"? –  Krist van Besien Apr 9 '13 at 13:46
show 3 more comments

1 Answer

Simply remove:

AddType text/html .php

Since your php files are php files and not plain content

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.