sfbaa1

Информация о пользователе

Привет, Гость! Войдите или зарегистрируйтесь.


Вы здесь » sfbaa1 » Тестовый форум » 🔹Установить веб-сервер IIS (на Windows 10 VPS)


🔹Установить веб-сервер IIS (на Windows 10 VPS)

Сообщений 1 страница 8 из 8

1

Открой PowerShell от имени администратора и выполни:

dism /online /enable-feature /featurename:IIS-WebServerRole /all

Это поставит IIS (встроенный веб-сервер Windows).
-------------------------------------------------------------------------------------
🔹 Шаг 2. Подготовить папку и закинуть карту

Создай папку для карт:

mkdir "C:\inetpub\wwwroot\maps"

Скопируй туда файл карты, например:

copy "C:\Users\Administrator\Downloads\mp_dvorik_soc.xdb0.cab" "C:\inetpub\wwwroot\maps\"

-------------------------------------------------------------------------------------------------------------------------------------------

🔹 Шаг 3. Разрешить скачивание файлов .cab и .xdb0

По умолчанию IIS не отдаёт такие форматы. Надо добавить MIME-типы:

Import-Module WebAdministration
# для .cab
New-WebMimeType -FileExtension ".cab" -MimeType "application/octet-stream"
# для .xdb0
New-WebMimeType -FileExtension ".xdb0" -MimeType "application/octet-stream"

🔹 Шаг 4. Открыть порт 80 в firewall
netsh advfirewall firewall add rule name="HTTP Server" dir=in action=allow protocol=TCP localport=80

🔹 Шаг 5. Проверка ссылки

Теперь файл должен быть доступен по адресу:

http://<IP_твоего_VPS>/maps/mp_dvorik_soc.xdb0.cab

Например, если у тебя IP 123.45.67.89 →
http://123.45.67.89/maps/mp_dvorik_soc.xdb0.cab

Открой в браузере — должен скачиваться.

🔹 Шаг 6. Получить CRC32

Нужно вычислить CRC файла, чтобы сделать ссылку в формате
CRC/http://IP/maps/файл.

Если есть Python:

import zlib
fname = r"C:\inetpub\wwwroot\maps\mp_dvorik_soc.xdb0.cab"
with open(fname,"rb") as f:
    data=f.read()
crc=zlib.crc32(data)&0xFFFFFFFF
print("{:08X}".format(crc))

Выдаст например 4654E1F8.

🔹 Шаг 7. Собрать финальную строку

Теперь у тебя есть:

CRC (например 4654E1F8)

Ссылка на файл (например http://123.45.67.89/maps/mp_dvorik_soc.xdb0.cab)

Финальный вид:

4654E1F8/http://123.45.67.89/maps/mp_dvorik_soc.xdb0.cab

0

2

PS C:\Users\Administrator> Import-Module WebAdministration
PS C:\Users\Administrator> New-WebMimeType -FileExtension ".cab" -MimeType "application/octet-stream"
New-WebMimeType : The term 'New-WebMimeType' is not recognized as the name of a cmdlet, function, script file, or opera
ble program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ New-WebMimeType -FileExtension ".cab" -MimeType "application/octet-st ...
+ ~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (New-WebMimeType:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

0

3

Add-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' `
   -filter "system.webServer/staticContent" `
   -name "." -value @{fileExtension='.cab';mimeType='application/octet-stream'}

0

4

>>    -name "." -value @{fileExtension='.cab';mimeType='application/octet-stream'}
Add-WebConfigurationProperty : Filename:
Error: Cannot add duplicate collection entry of type 'mimeMap' with unique key attribute 'fileExtension' set to '.cab'
At line:1 char:1
+ Add-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' `
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Add-WebConfigurationProperty], COMException
    + FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.IIs.PowerShell.Provider.AddConfigurationPro
   pertyCommand

0

5

Add-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' `
   -filter "system.webServer/staticContent" `
   -name "." -value @{fileExtension='.xdb0';mimeType='application/octet-stream'}

0

6

iisreset

0

7

http://38.60.218.145/maps/mp_dvorik_soc.xdb0.cab

0

8

Get-ItemProperty 'IIS:\Sites\Default Web Site' | Select-Object name, physicalPath, bindings

0


Вы здесь » sfbaa1 » Тестовый форум » 🔹Установить веб-сервер IIS (на Windows 10 VPS)


+ Создать свой форум бесплатно

Лучший хостинг