Changed PHP-FPM options, site requires password

Discussion in 'General' started by TheRudy, Oct 31, 2016.

  1. TheRudy

    TheRudy ISPConfig Developer ISPConfig Developer

    So this is something interesting, I wanted to test the PHP-FPM with static instead of dynamic and I changed that for a site under Options tab. Saved the changes, waited for the job to be done by ISPC and now the site requires a password for access.

    Site used Let's Encrypt SSL, I went and looked into config file for this site and there is no VirtualHost for 443 anymore.
    Went back to ISPC and changed by to previous settings, saved and still the same.
    Went and removed SSL/Let's Encrypt checkboxes and still nothing, keeps asking for password.
    I've checked the folders and in ISPC for protected folders and could not find anything.
    I'm using Debian 8.6.
    ISPC version: 3.1.1
    This is what is left of the apache config for the site in question:
    Code:
    <Directory /var/www/domain.tld>
            AllowOverride None
                    Require all denied
            </Directory>
    <VirtualHost *:80>
    
                        DocumentRoot /var/www/clients/client0/web1/web
              
            ServerName domain.tld
            ServerAlias www.domain.tld
            ServerAdmin [email protected]
    
            ErrorLog /var/log/ispconfig/httpd/domain.tld/error.log
    
            Alias /error/ "/var/www/domain.tld/web/error/"
            ErrorDocument 400 /error/400.html
            ErrorDocument 401 /error/401.html
            ErrorDocument 403 /error/403.html
            ErrorDocument 404 /error/404.html
            ErrorDocument 405 /error/405.html
            ErrorDocument 500 /error/500.html
            ErrorDocument 502 /error/502.html
            ErrorDocument 503 /error/503.html
    
            <IfModule mod_ssl.c>
            </IfModule>
    
            <Directory /var/www/domain.tld/web>
                    # Clear PHP settings of this website
                    <FilesMatch ".+\.ph(p[345]?|t|tml)$">
                            SetHandler None
                    </FilesMatch>
                    Options +FollowSymLinks
                    AllowOverride All
                                    Require all granted
                            </Directory>
            <Directory /var/www/clients/client0/web1/web>
                    # Clear PHP settings of this website
                    <FilesMatch ".+\.ph(p[345]?|t|tml)$">
                            SetHandler None
                    </FilesMatch>
                    Options +FollowSymLinks
                    AllowOverride All
                                    Require all granted
            </Directory>
    
    
    
    
            # suexec enabled
            <IfModule mod_suexec.c>
                SuexecUserGroup web1 client0
            </IfModule>
            <IfModule mod_fastcgi.c>
                    <Directory /var/www/clients/client0/web1/cgi-bin>
                                            Require all granted
                                        </Directory>
    <Directory /var/www/domain.tld/web>
                        <FilesMatch "\.php[345]?$">
                            SetHandler php5-fcgi
                        </FilesMatch>
                    </Directory>
                    <Directory /var/www/clients/client0/web1/web>
                        <FilesMatch "\.php[345]?$">
                            SetHandler php5-fcgi
                        </FilesMatch>
                    </Directory>
                    Action php5-fcgi /php5-fcgi virtual
                    Alias /php5-fcgi /var/www/clients/client0/web1/cgi-bin/php5-fcgi-*-80-domain.tld
                    FastCgiExternalServer /var/www/clients/client0/web1/cgi-bin/php5-fcgi-*-80-domain.tld -idle-timeout 300 -socket /var/lib/php5-fpm/web1.sock -pass-header Authorization
            </IfModule>
            <IfModule mod_proxy_fcgi.c>
                #ProxyPassMatch ^/(.*\.php[345]?(/.*)?)$ unix:///var/lib/php5-fpm/web1.sock|fcgi://localhost//var/www/clients/client0/web1/web/$1
                <Directory /var/www/clients/client0/web1/web>
                    <FilesMatch "\.php[345]?$">
                            SetHandler "proxy:unix:/var/lib/php5-fpm/web1.sock|fcgi://localhost"
                    </FilesMatch>
                </Directory>
                </IfModule>
    
    
            RewriteEngine on
            RewriteCond %{REQUEST_URI} ^/\.well-known/acme-challenge/
            RewriteRule ^ - [END]
            RewriteCond %{HTTP_HOST} ^domain\.tld$ [NC]
                    RewriteRule ^(.*)$ http://www.domain.tld$1 [R=301,NE,L]
            RewriteCond %{HTTPS} off
                    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
    
            # add support for apache mpm_itk
            <IfModule mpm_itk_module>
                AssignUserId web1 client0
            </IfModule>
    
            <IfModule mod_dav_fs.c>
            # Do not execute PHP files in webdav directory
                <Directory /var/www/clients/client0/web1/webdav>
                    <ifModule mod_security2.c>
                        SecRuleRemoveById 960015
                        SecRuleRemoveById 960032
                    </ifModule>
                    <FilesMatch "\.ph(p3?|tml)$">
                        SetHandler None
                    </FilesMatch>
                </Directory>
                DavLockDB /var/www/clients/client0/web1/tmp/DavLock
                # DO NOT REMOVE THE COMMENTS!
                # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
          # WEBDAV BEGIN
                # WEBDAV END
            </IfModule>
    
    
    
    </VirtualHost>
    
    Any ideas?
    Edit: I had to manually insert the VirtualHost for SSL and of course it is working. Could this be an ISPC bug?
     
    Last edited: Oct 31, 2016
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Unlikely. If the ssl vhost is not added, then apache did not accepted the new config at the time ispconfig wrote the config file or apache did not start with that new config. Check the vhost.err file fir the non working config.
     
  3. TheRudy

    TheRudy ISPConfig Developer ISPConfig Developer

    Has happened again. There is no vhost.err file anywhere. Any other file I can look into it? Can't find anything..
     
  4. TheRudy

    TheRudy ISPConfig Developer ISPConfig Developer

    Could it be that I had old lets encrypt version? Just pulled the latest one..
    I had zero warnings in all the log files I checked, the certificate was valid but when page was loaded it pointed to the last site for which I made the certificate. After some playing around it now looks like it is working. I have no idea what I did this time and it's annoying. :)

    Same problem: https://www.howtoforge.com/communit...e-but-only-on-some-domains.74363/#post-349958
     

Share This Page