how to host php website on windows server code example

Example 1: how to host a php server

php artisan serve --host your-ip-add --port 8000

// Example with port
php artisan serve --host 192.168.1.001 --port 8000

Example 2: windows hosting run php

//in your Folder web.config add <add value="index.php" />
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <defaultDocument enabled="true">
      <files>
        <clear />
        <add value="index.php" />
        <add value="index.aspx" />
        <add value="index.asp" />
        <add value="index.htm" />
        <add value="index.html" />
        <add value="home.aspx" />
        <add value="home.asp" />
        <add value="home.htm" />
        <add value="home.html" />
        <add value="default.aspx" />
        <add value="default.asp" />
        <add value="default.htm" />
        <add value="default.html" />
      </files>
    </defaultDocument>
  </system.webServer>
</configuration>

Tags:

Php Example