Apache default page instead of index page

Discussion in 'Installation/Configuration' started by jsmo, Apr 19, 2015.

  1. jsmo

    jsmo New Member

    Hello!

    Using CentOS 7 and ISPconfig 3.0.5.4p5. All new install, and I want domain.com to be hosted there. The DNS is a remote one, I changed the domain IP there, let's say 87.1.1.1 that is my fixed IP address on the server.

    In ISPconfig I setup a client, and this client's domain name domain.com. These files are created:

    /etc/httpd/conf/sites-available that contains domain.com.vhost
    /etc/httpd/conf/sites-enabled that contains 100-domain.com.vhost

    In these 2 files I find what seems normal, beginning by:
    <VirtualHost 83.1.1.1:80>
    DocumentRoot /var/www/domain.com/web
    ServerName domain.com
    ServerAlias www.domain.com

    etc etc

    Directories are correct and contain the website that I uploaded, especially a index.html file.

    Despite this, http://domain.com or http://www.domain.com show a default apache page.
    And http://domain.com/index.html shows a "File not found" page. So it seems clear that the website does not arrive in the correct location...

    I tried to delete the domain and the client, then setup again, same thing. And same thing with a second domain of course.

    Any suggestion? I am already thinking to remove ISPconfig, usually I used Plesk that installed all very quietly...

    Thank you!
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The ISPConfig perfect setup guide for centos works out of the box, just installed it for a client last week by simple copy/paste. I hope you used that one and followed it to the letter?

    http://www.howtoforge.com/perfect-s...l-php-pureftpd-postfix-dovecot-and-ispconfig3
    http://www.howtoforge.com/perfect-server-centos-7-x86_64-nginx-dovecot-ispconfig-3

    What is the hostname of the server? You cant use domain.com or www.domain.com as server hostname when you plan to use this domain as website. as described in the manual, the hostname has to be a subdomain like server1.domain.com.

    If the above is ok, then add the ip address under System > Server IP and select the Ip instead of * in the website settings.
     
  3. jsmo

    jsmo New Member

    Hello,
    Sure I read and strictly followed the instructions on the "perfect setup guide" (even if I did not understand all :))

    The host name is a different server name: serv.server2.com (I plan to host server2.com on the box too)...
     
  4. jsmo

    jsmo New Member

    > If the above is ok, then add the ip address under System > Server IP and select the Ip instead of * in the website settings.

    I already did it yesterday...

    Also in System / Server config, the IP address (1st box) is the internal IP (on my network - 192.168.1.200 for example) or the external IP (87.1.1.1 for example)?

    Anyway I tried both, nothing changed...
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    This is the internal IP.

    Please run the test script and post the output:

    https://www.howtoforge.com/community/threads/please-read-before-posting.58408/

    also run:

    /usr/local/ispconfig/server/server.sh

    command and check if it works afterwards.
     
  6. jsmo

    jsmo New Member

    Hum I have a question, right now: The hostname MUST point to an IP on the server? (a A record)? Because I see the file below after having run the test...

    ##### SERVER #####
    IP-address (as per hostname): ***.***.***.***
    [WARN] could not determine server's ip address by ifconfig
    [INFO] ISPConfig is installed.

    ##### ISPCONFIG #####
    ISPConfig version is 3.0.5.4p5
    ##### VERSION CHECK #####
    [INFO] php (cli) version is 5.4.16
    ##### PORT CHECK #####
    [WARN] Port 465 (SMTP server SSL) seems NOT to be listening
    ##### MAIL SERVER CHECK #####
    [WARN] I found no "submission" entry in your postfix master.cf
    [INFO] this is not critical, but if you want to offer port 587 for smtp connections you have to enable this.
    [WARN] I found no "smtps" entry in your postfix master.cf
    [INFO] this is not critical, but if you want to offer SSL for smtp (not TLS) connections you have to enable this.

    ##### RUNNING SERVER PROCESSES #####
    [INFO] I found the following web server(s):
    Unknown process (httpd) (PID 13823)
    [INFO] I found the following mail server(s):
    Postfix (PID 2164)
    [INFO] I found the following pop3 server(s):
    Dovecot (PID 1035)
    [INFO] I found the following imap server(s):
    Dovecot (PID 1035)
    [INFO] I found the following ftp server(s):
    PureFTP (PID 1019)

    ##### LISTENING PORTS #####
    (only ()
    Local (Address)
    [anywhere]:25 (2164/master)
    [localhost]:953 (1091/named)
    [anywhere]:993 (1035/dovecot)
    [anywhere]:995 (1035/dovecot)
    [localhost]:10024 (4378/amavisd)
    [localhost]:9000 (988/php-fpm:)
    [localhost]:10025 (2164/master)
    [anywhere]:3306 (2491/mysqld)
    [anywhere]:110 (1035/dovecot)
    [anywhere]:143 (1035/dovecot)
    [anywhere]:111 (698/rpcbind)
    ***.***.***.***:53 (1091/named)
    [localhost]:53 (1091/named)
    [anywhere]:21 (1019/pure-ftpd)
    [anywhere]:22 (984/sshd)
    [localhost]:631 (17260/cupsd)
    *:*:*:*::*:25 (2164/master)
    *:*:*:*::*:953 (1091/named)
    *:*:*:*::*:443 (13823/httpd)
    *:*:*:*::*:993 (1035/dovecot)
    *:*:*:*::*:995 (1035/dovecot)
    *:*:*:*::*:10024 (4378/amavisd)
    [localhost]10 (1035/dovecot)
    [localhost]43 (1035/dovecot)
    [localhost]11 (698/rpcbind)
    *:*:*:*::*:8080 (13823/httpd)
    *:*:*:*::*:80 (13823/httpd)
    *:*:*:*::*:8081 (13823/httpd)
    *:*:*:*::*:53 (1091/named)
    *:*:*:*::*:21 (1019/pure-ftpd)
    *:*:*:*::*:22 (984/sshd)
    *:*:*:*::*:631 (17260/cupsd)
    ##### IPTABLES #####
    Chain INPUT (policy ACCEPT)
    target prot opt source destination

    Chain FORWARD (policy ACCEPT)
    target prot opt source destination

    Chain OUTPUT (policy ACCEPT)
    target prot opt source destination
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    For testing purposes, this does not matter. But if you want to use the server on the real internet, the hostname must be resolvable in dns and point to the main ip address of the server.

    Regarding the vhost you posted above, if your server is behind a nAT router, then the vhost must show your private address and not the public IP. The private IP is used in the website settings, the public IP is used in dns and your router translates between public and private IP.
     
  8. jsmo

    jsmo New Member

    Well, so I will change the IP of the hostname at the DNS service...

    > the vhost must show your private address and not the public IP

    Where?
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    In that file. The Ip address shown there is the one that you selected in teh website settings.
     
  10. jsmo

    jsmo New Member

    I should write the 192.168.1.200 here???

    In both
    /etc/httpd/conf/sites-available that contains domain.com.vhost
    /etc/httpd/conf/sites-enabled that contains 100-domain.com.vhost

    Looks strange... no/ ))
     
  11. jsmo

    jsmo New Member

    Ehhhh it works after I changed the IP in /etc/httpd/conf/sites-available that contains domain.com.vhost (the other file already had the internal IP)

    Thanks you a lot, really :)
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    But you should change the ip in ispconfig (set the interal ip and not the external one in website settings), never edit the vhost files manually. ispconfig will then write the new ip to the vhost file.
     
  13. jsmo

    jsmo New Member

    hum... In "Server Config" or in "Server IP addresses"??
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    In the settings of thst specific website, go to sites, click on the website in the list that you see and select there the internal IP address on the ipv4 address field. If it does not show up there, then you probably added the external instead of the internal IP under System > Server IP.
     
  15. jsmo

    jsmo New Member

    ok, then restart networking? or apache?
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    No, just select the ip in website settings and press save. the new config is written after 60 seconds.
     
  17. jsmo

    jsmo New Member

    Thanks for all your help, indeed!
     

Share This Page