I had to review website and i got whole website sent in ziped file. I extracted it in home directory and tried to view it with browser. Since all files are *.php browser instead of displaying them tried to download them. I went ahead and copied all files of website to /srv/www/htdocs and tried from browser localhos/index.php (index file of website) - it worked.
so my question is - how can i make this work without transferring all files into /srv/www/htdocs but instead, for example from /home/username/public_html
You should also take note of what the error was. Not all errors are the same although they might look the same to you. A 404 means that the URL doesn’t exist, but if you get a 403 that means you have a permission issue.
The file index.php must be readable to the world and all the directories leading to it must have read and search (r-x) permission for the world.
[Thu Oct 30 23:58:18 2008] [error] [client 127.0.0.1] File does not exist: /srv/www/htdocs/home
so it still looking in /srv/www/htdocs. Do i have to change somethig (add) in apache.conf? like to make apache read public_html folder in my home directory?
… i was…
but still i get 404 error.
(and strange is tht i can’t even enter “~” in firefox address bar, in opera it ispossible to do so, but as i have sad - 404!!!
Something strange with your keyboard or browser charset in Firefox then.
What’s in /var/log/apache2/error_log when you go to http://localhost/~nikom/index.php with Opera? It should try to fetch from /home/nikom/public_html/index.php, and then you should check that you have allowed Apache to serve these files, and also the permissions of index.php and every directory on that path, that is to say: / /home /home/nikom /home/nikom/public_html should have read and search permission for others.
BTW if you are tired of figuring out the permission system, another way out is to create a directory owned by you, say /srv/www/htdocs/nikom, and then you can put your PHP scripts there. You could reduce typing by making a symlink to it.
BTW if you are tired of figuring out the permission system, another way out is to create a directory owned by you, say /srv/www/htdocs/nikom, and then you can put your PHP scripts there. You could reduce typing by making a symlink to it.
i’m doing it already…it’s just killing me WHY OH WHY i can’t put public_html folder to work…>:( >:( >:( >:(
all read rights are r-x to world, all modules are loaded…WHAT ELSE DO YOU WANT FROM ME???
(ken_yap thnx for you help, really appreciated…and i’m not going to give up…dean it.
this frustration of mine wasn’t directed to you, i hope it was clear that my php and apapache configuration are the reason)