plz any one suggest the best way of installing yii2.0 , I tried the given but not able to access the web folder
plz any one suggest the best way of installing yii2.0 , I tried the given but not able to access the web folder
Ultimately, apache has to see the index.php file in the web folder. [size=“2”]You didn’t provide much information about your development environment. I don’t know if this will help, but if you are using apache, you need a vhost entry, something like the following:[/size]
[color="#660066"][font="Consolas"][size="2"]NameVirtualHost[/size][/font][/color][font="Consolas"][size="2"] *[/size][/font]
[color="#000088"][font="Consolas"][size="2"]<VirtualHost[/size][/font][/color] [color="#660066"][font="Consolas"][size="2"]yourdomain[/size][/font][/color][font="Consolas"][size="2"].[/size][/font][color="#660066"][font="Consolas"][size="2"]com>[/size][/font][/color]
[color="#660066"][font="Consolas"][size="2"]DocumentRoot[/size][/font][/color] [color="#008800"][font="Consolas"][size="2"]"path\to\yourdomain\web"[/size][/font][/color]
[color="#660066"][font="Consolas"][size="2"]ServerName[/size][/font][/color][font="Consolas"][size="2"] localhost[/size][/font]
[color="#660066"][font="Consolas"][size="2"]ServerAlias[/size][/font][/color][font="Consolas"][size="2"] www[/size][/font][color="#666600"][font="Consolas"][size="2"].[/size][/font][/color][font="Consolas"][size="2"]yourdomain[/size][/font][color="#666600"][font="Consolas"][size="2"].[/size][/font][/color][font="Consolas"][size="2"]com[/size][/font]
[color="#000088"][font="Consolas"][size="2"]</VirtualHost>[/size][/font][/color]
[color="#000088"][font="Consolas"][size="2"]yourdomain is the root folder of the project.[/size][/font][/color]
[color="#000088"][font="Consolas"][size="2"]I use the advanced app, which has frontend and backend folders on xammp for Windows, so I set the following vhost:[/size][/font][/color]
[color="#000088"][font="Consolas"][size="2"][color="#660066"][size="2"]NameVirtualHost[/size][/color][color="#000000"][size="2"] *[/size][/color]
[size="2"]<VirtualHost[/size] [color="#660066"][size="2"]mydomain[/size][/color][color="#000000"][size="2"].[/size][/color][color="#660066"][size="2"]com>[/size][/color]
[color="#660066"][size="2"]DocumentRoot[/size][/color] [color="#008800"][size="2"]"C:\var\www\mydomain\frontend\web"[/size][/color]
[color="#660066"][size="2"]ServerName[/size][/color][color="#000000"][size="2"] localhost[/size][/color]
[color="#660066"][size="2"]ServerAlias[/size][/color][color="#000000"][size="2"] www[/size][/color][color="#666600"][size="2"].[/size][/color][color="#000000"][size="2"]mydomain[/size][/color][color="#666600"][size="2"].[/size][/color][color="#000000"][size="2"]com[/size][/color]
[size="2"]</VirtualHost>[/size]
[size="2"]If you do it this way, you would also need a local host entry for your local machine:[/size]
[color="#434343"][font="Arial"][size="2"]On windows, open notepad in administrator mode and go to:[/size][/font][/color]
[color="#000000"][font="Consolas"][size="2"]c[/size][/font][/color][color="#666600"][font="Consolas"][size="2"]:[/size][/font][/color][color="#880000"][font="Consolas"][size="2"]// Windows/System32/drivers/etc[/size][/font][/color]
[color="#434343"][font="Arial"][size="2"]select all [/size][/font][/color][color="#000000"][font="Arial"][size="2"]Files (.)[/size][/font][/color][color="#434343"][font="Arial"][size="2"] for file types, then select:[/size][/font][/color]
[color="#000000"][font="Consolas"][size="2"]hosts[/size][/font][/color]
[color="#434343"][font="Arial"][size="2"]add the following and save:[/size][/font][/color]
[color="#006666"][font="Consolas"][size="2"]127.0[/size][/font][/color][color="#666600"][font="Consolas"][size="2"].[/size][/font][/color][color="#006666"][font="Consolas"][size="2"]0.1[/size][/font][/color][color="#000000"][font="Consolas"][size="2"] [/size][/font][/color][color="#000000"][font="Consolas"][size="2"]yourdomain[/size][/font][/color][color="#666600"][font="Consolas"][size="2"].[/size][/font][/color][color="#000000"][font="Consolas"][size="2"]com wwww[/size][/font][/color][color="#666600"][font="Consolas"][size="2"].[/size][/font][/color][color="#000000"][font="Consolas"][size="2"]yourdomain[/size][/font][/color][color="#666600"][font="Consolas"][size="2"].[/size][/font][/color][color="#000000"][font="Consolas"][size="2"]com [/size][/font][/color]
[color="#000000"][font="Consolas"][size="2"]if you use the advanced template, you need a second entry for: [/size][/font][/color]
[color="#006666"][font="Consolas"][size="2"]127.0[/size][/font][/color][color="#666600"][font="Consolas"][size="2"].[/size][/font][/color][color="#006666"][font="Consolas"][size="2"]0.1[/size][/font][/color][color="#000000"][font="Consolas"][size="2"] [/size][/font][/color][color="#000000"][font="Consolas"][size="2"]backend[/size][/font][/color][color="#666600"][font="Consolas"][size="2"].[/size][/font][/color][color="#000000"][font="Consolas"][size="2"]yourdomain[/size][/font][/color][color="#666600"][font="Consolas"][size="2"].[/size][/font][/color][color="#000000"][font="Consolas"][size="2"]com [/size][/font][/color]
[color="#000000"][font=“Consolas”][size=“2”]Please note, I’m not an expert on dev and server environments, just trying to be helpful…[/size][/font][/color]
[/size][/font][/color]
thank you for your reply, I am using ubuntu, as I think yii2.0 not installed properly, could u suggest the better way to install this,
What’s your problem mannu ?