Website showing default apache page, fresh install

Discussion in 'Installation/Configuration' started by thetycza, Nov 12, 2017 at 3:23 PM.

  1. thetycza

    thetycza New Member

    Hello,
    I have fresh install The perfect server (Debian 9 + Ispconfig3). I add new website in CP (ex. livinghouse.cf, IP set to *), but when i open it in browser, it allways going to apache default page. I try add more site/delete but always is the same.

    It's my first time with ispconfig so pls tell me what i must first check.

    I try cp vhost.err to vhost file, but nothing change...
     
    Last edited: Nov 13, 2017 at 11:18 AM
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Which error do you get when you restart apache then?
     
  3. thetycza

    thetycza New Member

    server.sh:
    When restarting apache:
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok. The .err file gets created by ISPConfig when apache reports an error and fails to start with the vhost file, it seems as if the error has been resolved when it is starting now. May you please post the content of the .vhost file of this website that ISPConfig created.
     
  5. thetycza

    thetycza New Member

    Code:
    <Directory /var/www/livinghouse.cf>
                    AllowOverride None
                                    Require all denied
                    </Directory>
    
    <VirtualHost *:80>
    
                                                                            DocumentRoot /var/www/livinghouse.cf/web
    
                    ServerName livinghouse.cf
                    ServerAlias www.livinghouse.cf
                    ServerAdmin [email protected]
    
                    ErrorLog /var/log/ispconfig/httpd/livinghouse.cf/error.log
    
                    Alias /error/ "/var/www/livinghouse.cf/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/livinghouse.cf/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/client1/web8/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>
    
    
    
                    # suexec enabled
    <IfModule mod_suexec.c>
                            SuexecUserGroup web8 client1
                    </IfModule>
    
    
                    # add support for apache mpm_itk
                    <IfModule mpm_itk_module>
                            AssignUserId web8 client1
                    </IfModule>
    
                    <IfModule mod_dav_fs.c>
                    # Do not execute PHP files in webdav directory
                            <Directory /var/www/clients/client1/web8/webdav>
                                    <ifModule mod_security2.c>
                                            SecRuleRemoveById 960015
                                            SecRuleRemoveById 960032
                                    </ifModule>
                                    <FilesMatch "\.ph(p3?|tml)$">
                                            SetHandler None
    </FilesMatch>
                            </Directory>
                            DavLockDB /var/www/clients/client1/web8/tmp/DavLock
                            # DO NOT REMOVE THE COMMENTS!
                            # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
          # WEBDAV BEGIN
                            # WEBDAV END
                    </IfModule>
    
    </VirtualHost>
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    The file is correct. Check that the hostname of your server is not livinghouse.cf with the commands:

    hostname

    and

    hostname -f

    The hostname has to be a subdomain that is not used for websites or mail like server1.livinghouse.cf
     
  7. thetycza

    thetycza New Member

    hostname:
    hostname -f:
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Change the hostname to a subdomain like server1.livinghouse.pl in the files /etc/hostname, /etc/hosts and /etc/postfix/main.cf and restart the server.

    is your server behind a router or in a datacenter with a public IP?
     
  9. thetycza

    thetycza New Member

    Change hostname like you say, but still dont work... My server have public IP.

    When I try change something for site on Control Panel, have now this msg:
    Manualy restart work without errors, but page livinghouse.cf still show default /var/www/html site...
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Please run the command:

    apache2ctl -S

    as root user and post the output.
     
  11. thetycza

    thetycza New Member

     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    The vhost is ok and loaded by apache. You are accessing it with http:// and not https, correct? Because this site is an http site at the moment and not an SSL enabled website.
     
  13. thetycza

    thetycza New Member

    Yes, im accessing via http://
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, Then please try this:

    add your external server IP address in ISPConfig under System > Server IP (if it does not show up there yet). Then select this IP instead of * in the website settings of the site, click save, wait at least 1 minute and check again.
     
  15. thetycza

    thetycza New Member

    Last edited: Nov 14, 2017 at 12:30 PM
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    The default folder /var/www/html is not used on ISPConfig systems. If you followed a tutorial to install WordPress there instead of installing it into a website, then this can be the reason for your problem that the vhost for the site is overridden by that wp install.
     
  17. ahrasis

    ahrasis Active Member

    I do not think anyone should actually install WP (or others) directly in /var/www/html when using ISPC. The best way, at least to me, is to create a proper website for it and then install the software in its web folder which normally will be in /var/www/livinghouse.cf/web.
     

Share This Page