IIS default homepage missing, replaced by organization website and mapped to public IP [Answered]RSS

3 replies

Last post Mar 22, 2019 06:28 AM by KabzJoe

  • IIS default homepage missing, replaced by organization website and mapped to public IP

    Mar 21, 2019 06:59 AM|KabzJoe|LINK

    Dear all, 

    This thread might be lengthy but i need your help trying to figure out the why my php website page "won't be found".

    I work for an international organization that has it's HQ and central domain(myorganization.org) in the US. I am an IT assistant in one of the countries(UG) and want to add a website to run alongside the subdomain (site1ug.myorganization.org).

    site1ug.myorganization.org was mapped to the public ip and the localhost(IIS default). I'd like to add a website (site2ug.myorganization.org) to run along side site1ug

    These are the instructions i followed.

    1. 1.Install Microsoft IIS server (8.5)
    2. 2.Install Visual C++ Redistributable for Visual Studio 2015
    3. 3.Install the Windows Role “CGI Module”

    4.Install and configure PHP (7.2.8)

    1. 5.Give “IIS users” access to your PHP folder (C:\PHP)
    2. 6.Install and enable the MSSQL extension in PHP
    3. 7.Extract the website files in your website folder (C:\intepub\wwwroot\site2ug)
    4. 8.Configure a new website (site2ug.myorganization.org), use your website folder location
    5. 9.Configure a SSL host header for the website (port 2255)
    6. 10.Install and configure URL Rewrite module on IIS
      1. 11.Add a rule to forward HTTP requests to HTTPS
    7. 12.Import the attached SQL files as Stored Procedures in the myorganization database
    8. 13.Configure a SQL account with only permission to execute the stored procedures
    9. 14.Configure the SQL server and account details in the config.php file.
    10. 15.Configure DNS records for your website (site2ug.myorganization.org)

     

    NOTE:

    While testing the site off the production network i was able to run the website through (http://localhost:2255/site2ug/) but i can't do that now since the localhost is mapped to site1ug.myorganization.org 

    NOW on the production network, I went as far as 11 and also configured SSL certificate for it. Upon browsing the site "PAGE cannot be found!"   EVEN when i left the host header empty, it returns the same ERROR.

    PS: I haven't added a dns record for it yet(Have to wait for HQ's permission).

    What i need to understand; is the DNS record missing the reason i can't browse the site? Or I'm i missing something?

    SplinterX
  • Rovastar Rovastar

    5428 Posts

    MVP

    Moderator

    Re: IIS default homepage missing, replaced by organization website and mapped to public IP

    Mar 21, 2019 03:18 PM|Rovastar|LINK

    Yes DNS is the reason the world can't see your site.

    You need to make sure traffic is hitting your box from the domain name you use.

    It is possible to emulate the DNS (domain name to the IP) by editing you local Hosts file.
    c:\Windows\System32\Drivers\etc\hosts on your client machine.
    But this may be overridden by your companies proxies.
    Troubleshoot IIS in style
    https://www.leansentry.com/
  • Re: IIS default homepage missing, replaced by organization website and mapped to public IP

    Mar 22, 2019 06:25 AM|KabzJoe|LINK

    After hours of troubleshooting I found a solution...

    I reinstalled PHP, MSSQL drivers.

    -reconfigured fastCGI

    -created a sessiondata folder inC:/php/sessiondata

    I then edited the php.ini file 

    -added the path for session_save

    -added the extension=php_sqlsvr

    After this i added the website in IIS and edited the host header for http via port:80 and https via port:443 i also added the SSL certificate.

    I then edited the server host file and added both site1ug.myorganization.org and site2ug.myorganization.org mapping them to the same ip address.

    NOTE:

    I realized that if i'd only add site2ug.myorganization.org to the host file it'd cause site1 to go offline and this is because both use port:443 hence both need to be specified.

    After this BOTH sites are working fine. 

    I hope someone else finds this useful incase they encounter the same.

    SplinterX
  • Re: IIS default homepage missing, replaced by organization website and mapped to public IP

    Mar 22, 2019 06:28 AM|KabzJoe|LINK

    Thank you Rovastar i did just that and it worked. I can now access it on the local network and soon as HQ adds it to the DNS the world will be able to see this.

     

    SplinterX