Iis localhost ошибка 404

  • Remove From My Forums
  • Вопрос

  • Установил IIS на sever 2016.
    Запустил ftp. Работает пол-года. Всё отлично.

    Решил сделать сайт. Добавляю, запускаю.
    Через http не открывается — ошибка 404 (ни IP, ни localhost, ни «обзор» внутри панели управления IIS).
    Порты открыты, пробовал указывать другие.

    Если в реестре HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesHTTP значение ключа start поменять с 3 на 4, то сайт
    перестаёт запускаться.
    Т.е. в браузере если писать ftp://»мой IP» — всё открывается (что на сервере, что в интернете), а если http://»мой IP»+разные вариации с сайтами и с портами — ошибка 404

    Где искать? Два дня не могу запустить это http на IIS

Ответы

  • Проблему решили добавлением прав для пула приложений и удалением IP из привязок

    • Предложено в качестве ответа

      8 февраля 2019 г. 12:56

    • Помечено в качестве ответа
      Alexander RusinovModerator
      10 февраля 2019 г. 22:36

I am having several issues with the DNS localhost on my computer.

Some instruction is redirecting all my explorers, including visual studio somewhere else than 127.0.0.1 when I visual studio or any browser looks for localhost.

Where can such thing be happening? I recently changed my hosts file to point localhost somewhere else, but then it did not work so I switched it back, so that cant be the problem.

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
127.0.0.1 localhost
::1 localhost

I have also unistalled and installed IIS, so is not a problem of iis not redirecting properly..

I am not being able to run Visual Studio solutions because of this problem.

I have tried pining 127.0.0.1 and it responds, I have also tried localhost and it also works, but when I type localhost on a browser it redirects to a «404» page.

  • Remove From My Forums
  • Question

  • User-331226797 posted

     newbie here.

    i am running IIS 7.5(first time ever yay) — on windows 7 HomePremium.

    Why do i get a «404 error not found» when i type in localhost on the browser  ? When i type in 127.0.0.1 IIS works fine, I have a simple html file in intetpub/wwwroot called indexhtml and  if i type 127.0.0.1/index.html  it displays what i
    want, which is  «IIS works». If i type localhost/index.html i get a 404 error the requested resource is not foundI’ve googled and searched and have found people with similar problems but it varies most can’t get either one to work.

      isn’t 127.0.0.1 and localhost the same thing ?

    I have a hunch that it might need just a setting tweaked , but i don’t know enough to find it. some have suggested to visit my hosts file and un- comment  #127.0.0.1 localhost which i already did but still nothingt . I had XAMP installed before and
    localhost was working fine a few days ago …it’s been uninstall (no issues with  itself ) i just wanted to try to learn IIS.

    any help is appreciated  thanks.

Answers

  • User-331226797 posted

     I actually just solved it(obvious) — It does have to do with bindings . I switched my bindings to all unassigned  and it now works- it was config to something else . DUH!

     I can now type either localhost and 127.0.0.1 and not get an http 404 error.

    thanks for all your help guys.

    hopefully I’ll get the hang of this thing soon ..>.>

    • Marked as answer by

      Tuesday, September 28, 2021 12:00 AM

I have just installed IIS on Windows Server 2008. If I go to localhost, the default page is displayed, so the web server is ok.

I have added a folder with a page in it in the inetpubwwwroot directory. The full path to the page is then C:inetpubwwwrootfolderfile.html.

I have restarted the services but if I navigate to localhost/folder/file.html I get a 404 file not found error.

Obviously I have forgotten something simple, but what is it? :)

asked Apr 14, 2014 at 10:44

user1301428's user avatar

user1301428user1301428

3,30511 gold badges37 silver badges55 bronze badges

12

For anyone that run into this and don’t find the other suggestions effective, also check that Windows is displaying file name extensions. Open Windows Explorer, click «View» in the top bar and then check «File name extensions».

I found that my file was actually named index.html.txt even though it was displaying index.html prior to checking the above setting.

answered Aug 1, 2017 at 21:08

Martin Carstens's user avatar

4

I had this same problem.

Observe your path: C:inetpubwwwrootfolderfile.html.

Ensure that:

  • The file name extension you are requesting (in this case, .html) is not being blocked by IIS.
  • The directories along the path you are requesting (in this case, folder) are not being blocked by IIS.

If you are on Windows 8/ Windows 10, you can check those two things in the IIS Manager desktop application.

Here is how:

  1. Open the IIS Manager. You can type it in the Windows search bar.
  2. In the file tree in the ‘Connections’ box, select the root of web application.
  3. In the Features View that appears in the middle of the screen, select Request Filtering.
  4. In the File Name Extensions tab, ensure that .html does not have the value false.
  5. In the Hidden Segments tab, ensure that NONE of the folders in your path (C:inetpubwwwrootfolderfile.html) are listed.

NOTE: If you cannot see the Request Filtering tool, you may not have enabled all of the IIS features. Search for ‘Turn off windows features’ on your machine. In the Windows Features manager, select all of the boxes in Internet Information Services -> World Wide Web Services and select the box Internet Information Services -> Web Management Tools -> IIS Management Consoles.

answered Sep 19, 2015 at 14:37

scottysseus's user avatar

I’ve had this issue before — I had to set the username and password in again at Anonymous Authentication and it worked perfectly. You can also switch on Detailed errors at Error Pages in IIS to give more info.

answered Apr 14, 2014 at 13:26

Lisa's user avatar

LisaLisa

771 gold badge2 silver badges9 bronze badges

2

Check the following:

  • Find the Authentication Configuration (Anonymous, Basic, Windows, …)
  • Based on the Authentication configuration, check that the account accessing the file (Anonymous, IUSR, SYSTEM, Authenticated Users, …) has enough NTFS permissions
  • Check if the file extension is not filtered in Request Filtering
  • Check if the file extension is explicitly declared in MIME types

answered Nov 23, 2020 at 17:27

Luke's user avatar

LukeLuke

4151 gold badge5 silver badges10 bronze badges

1

I had this same error. My issue was that I accidentally installed another instance of DNN to the same SQL database. I restored a backup of my database to a new database then pointed the config file to the new database. Then both instances worked great.

answered Jul 19, 2018 at 15:52

Nathan Heinrich's user avatar

In the IIS Connections pane, click on the Sites node and check the Status column on the right. In my case, the Default Web Site was stopped and was giving me 404 error.

answered Jun 3, 2019 at 4:44

Matstar's user avatar

I was having the same problem and more. Not only would the html pages not show, but also the images. I noticed the MIME types was not listed in my new computer under the IIS settings and went in and added all the services I could find under Windows Features for IIS. I know its the shotgun approach, and one of those is responsible for the MIME but everything started working correctly once I did this.

answered May 1, 2021 at 15:05

user1324192's user avatar

Solution 1

Make sure that IIS is actually configured to listen on 127.0.0.1 (perhaps you removed the binding previously?)

netsh http show iplisten
IP addresses present in the IP listen list:
127.0.0.1

You can add additional IPs like so:

netsh http add iplisten ipaddress=10.0.0.10

Solution 2

I just had this problem too and it turned out to be an issue with Default Web Site’s bindings in IIS. I had specified the «Host Name» to be the server’s domain name, meaning external access worked fine but trying to access any IIS page through localhost returned a browser 404 error.

Simply clearing that «Host Name» field and leaving it blank fixed the problem for me.

Solution 3

I added a binding to the site that accepted IP address 127.0.0.1 over port 80 and was able to connect.

Comments

  • I am having several issues with the DNS localhost on my computer.

    Some instruction is redirecting all my explorers, including visual studio somewhere else than 127.0.0.1 when I visual studio or any browser looks for localhost.

    Where can such thing be happening? I recently changed my hosts file to point localhost somewhere else, but then it did not work so I switched it back, so that cant be the problem.

    # Copyright (c) 1993-2009 Microsoft Corp.
    #
    # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
    #
    # This file contains the mappings of IP addresses to host names. Each
    # entry should be kept on an individual line. The IP address should
    # be placed in the first column followed by the corresponding host name.
    # The IP address and the host name should be separated by at least one
    # space.
    #
    # Additionally, comments (such as these) may be inserted on individual
    # lines or following the machine name denoted by a '#' symbol.
    #
    # For example:
    #
    #      102.54.94.97     rhino.acme.com          # source server
    #       38.25.63.10     x.acme.com              # x client host
    
    # localhost name resolution is handled within DNS itself.
    127.0.0.1 localhost
    ::1 localhost
    

    I have also unistalled and installed IIS, so is not a problem of iis not redirecting properly..

    I am not being able to run Visual Studio solutions because of this problem.

    I have tried pining 127.0.0.1 and it responds, I have also tried localhost and it also works, but when I type localhost on a browser it redirects to a «404» page.

  • This helped me. I had bindings for my web URLs but did not have one for localhost. Adding a localhost binding worked.

Recents

Понравилась статья? Поделить с друзьями:

Не пропустите эти материалы по теме:

  • Яндекс еда ошибка привязки карты
  • Imax b6 mini ошибки
  • Imap ошибка 550
  • Imap yandex ru ошибка при проверке
  • Imap gmail com на айфоне ошибка сертификата

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии