Answer the question
In order to leave comments, you need to log in
How to set up yii2 in iis8?
IIS8 is on a virtual machine. It has a public ip address . It is necessary that my site written in yii2 advanced opens at this address. Therefore, I moved the project to the c:\inetpub\wwwroot\my project folder from the c:\domain\ myproject\ folder . In manager IIS8, I registered a new path to the folder c:\inetpub\wwwroot\my project\frontend\web . There is a web.config file :
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<directoryBrowse enabled="false" />
<httpRedirect enabled="false" destination="" childOnly="true" httpResponseStatus="Permanent" />
<rewrite>
<rules>
<rule name="Hide Yii Index" enabled="true" stopProcessing="true">
<match url="^(.*)\?*$" ignoreCase="false" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="/index.php/{R:1}" appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Answer the question
In order to leave comments, you need to log in
If your virtual machine is running over a network, then use the machine's address in the ip address bar instead of 127.0.0.1 and localhost. Read about it. Set up the hosts yourself. Your project should be available at: http://10.12.155.34/project
Next, configure your web server so that it sends all requests to http://10.12.155.34/project
frontend/web/index.php
The question is not entirely related to yii, it's more about setting up a server and working over the network.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question