nginx test page

Discussion in 'Installation/Configuration' started by LinuxPete, Oct 13, 2017.

  1. LinuxPete

    LinuxPete Member

    This may sound like a config problem but I cannot get past this. I am hosting 4 websites on my server.
    One website give the nginx test page when I try to reach it. i.e. example1.com, or www.example1.com.
    I've checked that the paths in Ispconfig3 match what is on the server. The access and error logs are empty.
    The permissions for index.html are set to u+rw-x, g+r-wx, other-rxw.
    This should seem like a config or perms problem but I cannot seem to get around it.
    When I bring up ISPconfig it has https://example1.com:8080/index.php# with no problem.
    When I open up RoundCube (http://www.example1:8081/squirrelmail/) it has an un-secure connection notification in the browser bar.
    If I try to open https://exampl31.com -- I get another hosted website on my server.
    Can anyone give me a little direction on this.
    Thanks
    Ray
    Centos 7, MariaDB, RoundCube, PHP
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    do you have SSL enabled in the website example31.com? If not, enable it. When you have several websites on your server that share the same IP and some of them have SSL and some not, when you access a website by https that has no SSL enabled, then you must get the content of the first SSL enabled site in alphabetical order.
     
  3. LinuxPete

    LinuxPete Member

    Hi Till,
    Thanks for your suggestion.
    I tried the following: I enabled SSL, and created a certificate (using Ispconfig) for the other two websites.
    The following happened to the CLIENT1 website: for HTTPS it now picks up the webpage of another (actually the last to have SSL turned on.) But for when attempting to connect with HTTP it gives the Nginx Test Page.
    After looking at the nginx config files in sites-enabled I found that even though I have SSL checked, a self-signed cert, the vhost files where not being updated to listen on port 443. Upon additional inspection, sites that had say 'Own Error Documents' turned on (but no error files) would not update. After fixing that for at two sites, every site can be reached by HTTPS and HTTP except client1.
    Client1 still show the last site to have SSL enabled with HTTPS and a nginx test page for HTTP. I'll continue to look for the strange stuff that may be causing this.
     
  4. LinuxPete

    LinuxPete Member

    I have another update: in looking at the access log from client6 I see that client1 is the referrer to its resource.
    "chiinux.net", referrer: "https://chilinux.net/ is an example. Not sure what it means in this case or why it is happening.
     
  5. LinuxPete

    LinuxPete Member

    Well, I got rid of the nginx test page by doing the following:
    I noticed that the client1 vhost file had
    listen 70.88.86.213:80;
    listen 70.88.86.213:443 ssl;
    but the others had:
    listen *:80;
    listen *:443 ssl;
    so I changed the vhost for client1, restarted nginx and finally got the webpage.
    When turned off SSL and deleted the cert, the problem came back.
    listen 70.88.86.213:80;
    this is a work around, not sure what is happening with Ispconfig3. Any ideas?
     
  6. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    It should be * in your ipv4 site's setting instead of an ip.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Do not change any vhost files manually as all changes get removed automatically, do the changes in ISPConfig. If ISPConfig is not writing the changes to disk, then you have an installation problem which you should fix. See ISPConfig debug instructions: https://www.faqforge.com/linux/debugging-ispconfig-3-server-actions-in-case-of-a-failure/

    Regarding IP vs. *. It does not matter which one you use, you just can't mix it as an IP is always a stronger match than a wildcard, so it will override the hosts that use a wildcard.
     
  8. LinuxPete

    LinuxPete Member

    Thanks, Till
    I'll put some time into debugging.
     
  9. LinuxPete

    LinuxPete Member

    I know but until Till responded, I had no idea of how to solve the problem. I'll do some debugging of Ispconfig later this evening. Thanks. Will keep all updated.
     
  10. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    I gave my response as he mentioned this:
    Not that I am suggesting he cannot used ip but it is easier to fix one site's settings to * instead of many to ip.
     
  11. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    actually it's pretty easy to change all sites ;) you can go into phpmyadmin, go to ISPConfig-db and issue eme SQL like
    Code:
    UPDATE web_domain SET ip_address='a.b.c.d', ipv6_address='1:2:3:4::5' WHERE server_id='1'
    
    except you use different IPs on your server, then of course you need to add some
    Code:
     AND domain='foo.bar' 
    to the WHERE.
    After that, just go to ISPConfig->Tools->Resync->Websites
     
    Last edited: Oct 18, 2017
    LinuxPete likes this.
  12. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    If you define that as easy, of course. ;)
     
  13. LinuxPete

    LinuxPete Member

    Hi, ztk.me, that did the trick.
    Thanks for the fix.
    Ray
     

Share This Page