SNI not activate

Discussion in 'Installation/Configuration' started by AmritMatti, Feb 17, 2019.

Tags:
  1. AmritMatti

    AmritMatti New Member

    i'm facing this issue
    SNI for SSL is not activated on this server. You can enable only one SSL certificate on each IP address.

    can any one help.
    Thanks in advance
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Enable SNI under System > Server Config > web in ISPConfig.
     
  3. AmritMatti

    AmritMatti New Member

    @till Thanks for reply
    I have tried but when click on it's showing error Website basedir is empty.
    Invalid website basedir path, min. length 5 chars.
    Website path is empty.
    website_path_error_regex
    Website symlinks is empty.
    Invalid website symlinks.
    Vhost config dir is empty.
    Invalid vhost config directory.
    Vhost config enabled dir is empty.
    Invalid vhost conf enabled directory.
    Nginx Vhost config dir is empty.
    Invalid nginx config directory.
    Nginx Vhost config enabled dir is empty.
    Invalid nginx conf enabled directory.
    Apache user is empty.
    Invalid apache user.
    Apache group is empty.
    Invalid apache group.
    Nginx user is empty.
    Invalid nginx user.
    Nginx group is empty.
    Invalid nginx group.
    Apache php.ini path is empty.
    Invalid apache php.ini path.
    CGI php.ini path is empty.
    Invalid cgi php.ini path.
    Description Default PHP-Version must not be empty
    PHP-FPM init script is empty.
    Invalid php-fpm init script.
    PHP-FPM php.ini path is empty.
    Invalid php-fpm ini path.
    PHP-FPM pool directory is empty.
    Invalid php-fpm pool directory.
    PHP-FPM socket directory is empty.
    Invalid php-fpm socket directory.
    PHP open_basedir is empty.
    Invalid php open_basedir.
    Nginx CGI Socket is empty.
    nginx_cgi_socket_error_regex
    .htaccess AllowOverride is empty.
    Apps-vhost port is empty.
    Apps-vhost IP is empty.
    awstats data directory is empty
    Invalid awstats data directory.
    awstats.pl setting is empty.
    Invalid awstats.pl path.
    awstats_buildstaticpages.pl is empty
    Invalid awstats_buildstaticpages.pl path.
    i am unable to save configuration. Please assist me,
     
  4. AmritMatti

    AmritMatti New Member

    Even if i am not using Nginx.
    It's showing error
    Nginx Vhost config dir is empty.
    Invalid nginx config directory.
    Nginx Vhost config enabled dir is empty.
    Invalid nginx conf enabled directory.
    Nginx user is empty.
    Invalid nginx user.
    Nginx group is empty.
    Invalid nginx group.
    Nginx CGI Socket is empty.
    nginx_cgi_socket_error_regex
     
  5. AmritMatti

    AmritMatti New Member

    anyone can help me on above issue please
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Seems as if the complete server config part in ISPConfig is not set, the easiest way to fix that is to restore it from a backup. Do you have a backup of the dbispconfig database? If not, did you ever install an ispconfig update in the past so you might have an auto backup created at that time?
     
  7. AmritMatti

    AmritMatti New Member

    yes i have updated it today. but after updation my server is crashed apache is not getting started
     
  8. AmritMatti

    AmritMatti New Member

    ispconfig_host_2019-04-01_08-28 i have this in my /var/backup folder how do i restore from it
     
  9. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    If your backup is from today, it does not help restoring it when the problem started a month ago. You need a backup from when the system was still OK.
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    From today's backup, you can get at least the apache config to start it again, see the etc backup tar.gz in that folder, from there you can restore the /etc/apache2/ config files. But as @Taleman pointed out, for the original problem you need an older backup or we have to restore the settings manually, but therefore I need to know which operating system you use.
     
  11. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    In that directory you will find a ispconfig_db_backup.sql file, which is an sql dump/backup of the ispconfig database at that time.

    In that file search for where the 'server' table is, eg. the string 'INSERT INTO `server`' (note that cut&paste from your web browser on the forum here might be goofy, including hidden characters, so if you don't find anything try retyping that manually or doing similar searches).

    This INSERT statement is very long, and includes values for each of your servers (if you only have one server it simpler), each in a set of parenthesis, and one of the fields in each is 'config' which is a very long text string in ini format, and this is what you are interested in. Eg. the INSERT statement looks like this, with some linebreaks added:
    Code:
    INSERT INTO `server` (`server_id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_name`, `mail_server`, `web_server`, `dns_server`, `file_server`, `db_server`, `vserver_server`, `proxy_server`, `firewall_server`, `xmpp_server`, `config`, `updated`, `mirror_server_id`, `dbversion`, `active`)
    VALUES (1,1,1,'riud','riud','r','srv1.domain.tld',0,0,0,0,0,0,0,0,0,'[global]\nwebserver=apache\nmailserver=postfix.....the very long string in ini format which you are interested in....warn_group_change=no\n\n',12689,0,86,1),
    (2,1,1,'riud','riud','r','srv2.domain.tld',1,0,0,0,0,0,0,1,0,'[global]\nwebserver=...another long string, for server id 2....warn_group_change=no\n\n',12699,0,86,1);
    
    You want to find the values for the server id in question (server_id is the first value in each set of parenthesis), and the goal is to copy that long 'config' string back into the live database.

    To copy the old 'config' section back, you could use phpmyadmin (if you can cut/paste the string in tact). What I would probably do is make a copy of the .sql file and delete everything else but that 'config' value, then add the sql to make it an UPDATE statement:
    Code:
    UPDATE server SET config = '[global]\nwebserver=apache\n....all of it...warn_group_change=no\n\n' WHERE server_id = 123;
    Then run that via mysql command line or upload that new sql file in phpmyadmin to run. Make sure to change the server_id from 123 to the correct value for your server.
     
  12. AmritMatti

    AmritMatti New Member

    root@:/var/backup/ispconfig__2019-04-01_08-28# ls
    etc.tar.gz ispconfig_db_backup.sql ispconfig_software.tar.gz
    root@:/var/backup/ispconfig_2019-04-01_08-28# mysql -u root -p dbispconfig < ispconfig_db_backup.sql
    Enter password:
    ERROR 1062 (23000) at line 50: Duplicate entry '1' for key 'PRIMARY'

    unable to restore backup. how do i fix it ?
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    backup the current database with phpmyadmin, then empty (truncate, not delete) all tables inside the database, finally run:

    mysql -u root -p dbispconfig < ispconfig_db_backup.sql
     
  14. AmritMatti

    AmritMatti New Member

    thanks @till
    now php is not getting executed it's showing code in browser.
     
  15. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Verify the settings under System > Server Config look correct for that server, then resync websites (or everything) under Tools > Resync.
     
  16. AmritMatti

    AmritMatti New Member

    I have install fresh isp config on fresh server.

    now when i am runing my wordpress site it showing error
    Forbidden
    You don't have permission to access / on this server.

    Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
    if i manually change Require all denied to Require all granted in apache host file than i am getting php surce code in browser instead of execution of it. please help

    i
     
  17. AmritMatti

    AmritMatti New Member

    this is default apache file that is configured automatically when i create a site from ispconfig panel
    <Directory /var/www/test.com>
    AllowOverride None
    Require all denied
    </Directory>

    <VirtualHost *:80>

    DocumentRoot /var/www/test.com/web

    ServerName test.com
    ServerAdmin [email protected]


    ErrorLog /var/log/ispconfig/httpd/test.com/error.log

    Alias /error/ "/var/www/test.com/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/test.com/web>
    # Clear PHP settings of this website
    <FilesMatch ".+\.ph(p[345]?|t|tml)$">
    SetHandler None
    </FilesMatch>
    Options +FollowSymLinks
    AllowOverride All
    Require all granted
    <Files ~ '.php[s3-6]{0,1}$'>
    Require all denied
    </Files>
    </Directory>
    <Directory /var/www/clients/client0/web2/web>
    # Clear PHP settings of this website
    <FilesMatch ".+\.ph(p[345]?|t|tml)$">
    SetHandler None
    </FilesMatch>
    Options +FollowSymLinks
    AllowOverride All
    Require all granted
    <Files ~ '.php[s3-6]{0,1}$'>
    Require all denied
    </Files>
    </Directory>






    RewriteEngine on
    RewriteCond %{REQUEST_URI} ^/\.well-known/acme-challenge/
    RewriteRule ^ - [END]
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L,NE]

    # add support for apache mpm_itk
    <IfModule mpm_itk_module>
    AssignUserId web2 client0
    </IfModule>

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



    </VirtualHost>


    <VirtualHost *:443>

    DocumentRoot /var/www/test.com/web

    ServerName test.com
    ServerAdmin [email protected]


    ErrorLog /var/log/ispconfig/httpd/test.com/error.log

    Alias /error/ "/var/www/test.com/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>
    SSLEngine on
    SSLProtocol All -SSLv2 -SSLv3
    # SSLCipherSuite ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS
    SSLHonorCipherOrder on
    # <IfModule mod_headers.c>
    # Header always add Strict-Transport-Security "max-age=15768000"
    # </IfModule>
    SSLCertificateFile /var/www/clients/client0/web2/ssl/test.com-le.crt
    SSLCertificateKeyFile /var/www/clients/client0/web2/ssl/test.com-le.key
    SSLCertificateChainFile /var/www/clients/client0/web2/ssl/test.com-le.bundle
    SSLUseStapling on
    SSLStaplingResponderTimeout 5
    SSLStaplingReturnResponderErrors off
    </IfModule>

    <Directory /var/www/test.com/web>
    # Clear PHP settings of this website
    <FilesMatch ".+\.ph(p[345]?|t|tml)$">
    SetHandler None
    </FilesMatch>
    Options +FollowSymLinks
    AllowOverride All
    Require all granted
    <Files ~ '.php[s3-6]{0,1}$'>
    Require all denied
    </Files>
    </Directory>
    <Directory /var/www/clients/client0/web2/web>
    # Clear PHP settings of this website
    <FilesMatch ".+\.ph(p[345]?|t|tml)$">
    SetHandler None
    </FilesMatch>
    Options +FollowSymLinks
    AllowOverride All
    Require all granted
    <Files ~ '.php[s3-6]{0,1}$'>
    Require all denied
    </Files>
    </Directory>






    RewriteEngine on
    RewriteCond %{REQUEST_URI} ^/\.well-known/acme-challenge/
    RewriteRule ^ - [END]

    # add support for apache mpm_itk
    <IfModule mpm_itk_module>
    AssignUserId web2 client0
    </IfModule>

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



    </VirtualHost>

    <IfModule mod_ssl.c>
    SSLStaplingCache shmcb:/var/run/ocsp(128000)
    </IfModule>
     
  18. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Looks like you need to enable php for this site. (Ie. set a php mode and version)
     
  19. AmritMatti

    AmritMatti New Member

    i have enable php under
    SSL
    Let's Encrypt SSL
    PHP

    PHP
    php-fpm but still it's showing code in browser
     
  20. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    When you make a change to the website and save does the little red circle showing the number of outstanding changes clear?

    Check the web server and see if a .err file is created for this vhost.
     

Share This Page