I am trying to install someone’s github project who used Yii. I am getting 404 not found errors and need help fixing it.
My index.php comes up fine when I go here:
But any urls in subdirectories fail with a 404 not found error.
For instance mydomain.com/stats gives the 404 error.
I am using lighttpd and php7. I don’t see anything in the logs for either of those two programs.
Structure is like this:
My root is:
/var/yaamp/web/
The index.php lives there.
Then I have subdirectories called
[b]/var/yaamp/web/assets
/var/yaamp/web/extensions
/var/yaamp/web/framework
/var/yaamp/web/images
/var/yaamp/web/yaamp[/b]
For the most part I think directly referencing files as they are in the directory structure works fine.
I can do mydomain.com/yaamp/modules/stats/test.php
But the original developer has lots of links that don’t explicitly exist in the structure
so I’m not sure why it isn’t working.
For instance mydomain.com/stats probably is referring to a file called
/var/yaamp/web/yaamp/modules/stats/index.php
I do get an error 500 when I try it like this:
mydomain.com/yaamp/modules/stats/index.php
also in that folder is a file that may be important called StatsController.php
The relevant section of my lighttpd.conf looks like this:
[b]$HTTP["host"] =~ "mydomain.com" {
server.document-root = "/var/yaamp/web"
url.rewrite-if-not-file = (
"^(.*)/([0-9]+)$" => "index.php?r=$1&id=$2",
"^(.*)\?(.*)" => "index.php?r=$1&$2",
"^(.*)" => "index.php?r=$1",
"." => "index.php"
)
url.access-deny = ( "~", ".dat", ".log" )
}[/b]
If anyone is interested the Github repo I am trying to get working is here: github.com/tpruvot/yiimp
I just don’t know what to do next. Please help!