HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=25)
-   -   SuPHP and SSL issue (http://www.howtoforge.com/forums/showthread.php?t=60089)

mcevoli 2nd January 2013 16:56

SuPHP and SSL issue
 
Hi,
I have a working vhosts setup with suphp configured.
I have one website (with joomla 2.5) using SSL.
Joomla seems not using suphp. I have no write permission on folders, but if I disable SSL I get the right permissions.

If I go to site information I can see the Server API is set to "Apache 2.0 Handler" while for the working suphp sites is set to "CGI/FastCGI", I don't' know if can be useful.

Thanks in advance for any help.:)

Marco

falko 3rd January 2013 15:19

Can you post your vhost configuration?

till 3rd January 2013 16:09

Suphp should not be used for joomla sites on ispconfig servers. better use php-fccgi and enable the suexec checkbox in the site settings.

mcevoli 3rd January 2013 16:25

My sites are working all ok but the one using SSL.

To enable SSL I didn't use the ispconfig ssl tab because I already had the files on old server.

So I added to ispconfig.vhost the following lines:
Code:

<VirtualHost *:443>
    SSLEngine On
    SSLProtocol all
    SSLCertificateFile /etc/pki/tls/certs/certificate.crt
    SSLCertificateKeyFile /etc/pki/tls/certs/private.key
    SSLCACertificateFile /etc/pki/tls/certs/intermediate.crt

    ServerAdmin webmaster@domainname.it
    ServerName domainname.it
    ServerAlias www.domainname.it
    DocumentRoot /var/www/domainname.it/web/
    ErrorLog /var/log/ispconfig/httpd/domainname.it/error.log

    <Directory /var/www/domainname.it/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
    <Directory /var/www/clients/client29/web32/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
       
       
 # Clear PHP settings of this website
    <FilesMatch "\.ph(p3?|tml)$">
        SetHandler None
    </FilesMatch>
    # suphp enabled
    <Directory /var/www/clients/client29/web32/web>
                <IfModule mod_suphp.c>
        suPHP_Engine on
        # suPHP_UserGroup web32 client29
        suPHP_ConfigPath /var/www/conf/web32
        AddHandler x-httpd-suphp .php .php3 .php4 .php5
        suPHP_AddHandler x-httpd-suphp
                </IfModule>
    </Directory>

    # add support for apache mpm_itk
    <IfModule mpm_itk_module>
      AssignUserId web32 client29
    </IfModule>

    <IfModule mod_dav_fs.c>
          # Do not execute PHP files in webdav directory
      <Directory /var/www/clients/client29/web32/webdav>
            <FilesMatch "\.ph(p3?|tml)$">
          SetHandler None
        </FilesMatch>
      </Directory>
      DavLockDB /var/www/clients/client29/web32/tmp/DavLock
      # DO NOT REMOVE THE COMMENTS!
      # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
      # WEBDAV BEGIN
      # WEBDAV END
    </IfModule>

</VirtualHost>

Thanks.

till 3rd January 2013 17:08

Quote:

To enable SSL I didn't use the ispconfig ssl tab because I already had the files on old server.

So I added to ispconfig.vhost the following lines:
Ok, thats wrong and can not work. Please undo the changes you made manually.

Then enable ssl in the wesbite that shall have ssl access and create a new self signed certificate in ispconfig for that site. Test if the ssl cert works. Afterwards replace the .key and .cert file in the ssl folder of the site (folder /var/www/yordomain.tld/ssl/) with the key and ssl cert that you already have and restart apache. Dont change any filenames, just replace the key and cert data in the files.


All times are GMT +2. The time now is 01:02.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.