LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   php not working on one vhost, but works on all others. (http://www.linuxquestions.org/questions/linux-server-73/php-not-working-on-one-vhost-but-works-on-all-others-851093/)

yungblood 12-18-2010 12:57 PM

php not working on one vhost, but works on all others.
 
I just added a ssl vhost. My php files are not running on it, they just get downloaded when I click them.

All my non-ssl vhosts were added by the admin software of my hosting company, but I had to manually add the vhost entry for my ssl vhost.

Here is the entry I added for my ssl vhost:
Code:

<VirtualHost www.vhost.com:443>
  DocumentRoot "/var/www/vhosts/vhost.com/httpsdocs"
  ErrorLog logs/ssl_error_log
  TransferLog logs/ssl_access_log
  SSLEngine on
  SSLProtocol all -SSLv2
  SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM

  SSLCertificateFile /usr/local/apache/conf/ssl.crt
  SSLCertificateKeyFile /usr/local/apache/conf/ssl.key
  SSLCertificateChainFile /usr/local/apache/conf/sub.class1.server.ca.pem
  SSLCACertificateFile /usr/local/apache/conf/ca-bundle.pem
  SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
</VirtualHost>

I'm sure I'm just missing something simple, but I can't seem to figure it out.

yungblood 12-18-2010 01:28 PM

I got it working. I found the original vhost config files for each vhost. I found I was missing the php lines:

Code:

  <Directory /var/www/vhosts/vhost.com/httpsdocs>
      <IfModule sapi_apache2.c>
        php_admin_flag engine on
        php_admin_flag safe_mode on
        php_admin_value open_basedir "/var/www/vhosts/vhost.com/httpsdocs:/tmp"
      </IfModule>
      <IfModule mod_php5.c>
        php_admin_flag engine on
        php_admin_flag safe_mode on
        php_admin_value open_basedir "/var/www/vhosts/vhost.com/httpsdocs:/tmp"
      </IfModule>
  </Directory>



All times are GMT -5. The time now is 04:33 PM.