Reputation: 137
I created a folder in var/www/html/test
. The folder consists of some PHP files. I am trying access the file like http://example.com/test/test. PHP shows the following error:
404 Not Found nginx/1.10.3 (Ubuntu)
Can anyone help me to fix this problem?
Upvotes: 1
Views: 16262
Reputation: 137
You had only one folder: test
. However, on your URL you are trying to access a test
folder inside another test
folder: test/test
.
So, because the folder test
inside test
doesn't exist, the server throws an 404 error (there is no such folder).
If you call: http://example.com/test/test
what you are really doing is call the file /test/test/index.html
, /test/test/index.htm
or /test/test/index.php
.
Upvotes: 4
Reputation: 182
you missed 'html' forlder in your URL. it should be like this. http://example.com/html/test/test
Upvotes: 0