Today to my grate surprise I got “502 Bad Gateway” error while trying to open some specific URL on my web site:
I took a look at the Nginx log file located in /var/log/nginx/ directory on my machine and seen the following:
Today to my grate surprise I got “502 Bad Gateway” error while trying to open some specific URL on my web site:
I took a look at the Nginx log file located in /var/log/nginx/ directory on my machine and seen the following:
Today to my great surprise I notices that my Apache web server randomly returns 403 Forbidden HTTP error code to search engine robots. Yandex Search Engine reported that on my favorite website 263 pages are OK and 210 pages has 403 status and some other site has 394/139 pages respectively.
In Apache error logs I found the following messages:
Permission denied: /home/<site-name>/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
as far as I see they appears whenever this 403 error is reported.
By default Apache 2 is configured in a way that phpmyadmin is automatically included to all the hosted web sites. For example, if I create a new site ‘site.com’, and then navigate to this address:
http://site.com/phpmyadmin
the phpmyadmin login page appears.
By default, Apache on Ubuntu executes all PHP scripts under www-data user, hence in situations where multiple mutually distrusting users have the possibility to put their PHP scripts on the server they could potentially spy on each other private data.
For example, the user user1 could put a PHP script that access file ‘file1.txt’ belonging to user2:
echo file_get_contents("/home/user2/www/file1.txt");