I recently switched from virtual hosting to a VPS server to debian 7. On a virtual hosting, my site worked remarkably more than a month out of the box. Nothing extra was necessary. But on the VPS ...
The hearsay was aware of how debian user-friendly was. Everyone warned me that I should take Ubuntu or CentOS, but I decided to put debian. In addition, it was necessary to install a trade bot.
I bought a hosting, set everything up, connected via SFTP, uploaded the site files, went to the site, and ... In response to the request, the server issued the source code of the page, including PHP, in text format, without any formatting. Just a text.
I decided to check whether php is installed in principle?
root@cs-bets:/# php5 -v -bash: php5: command not found From that moment I began to suspect that I was waiting.
Well, - I thought - This is not such a big problem.
root@cs-bets:/# apt-get install php5 libapache2-mod-php5 (...) 0 upgraded, 2 newly installed, 0 to remove and 350 not upgraded. root@cs-bets:/# apachectl restart After that, updating the page, and seeing the interface of the site, I almost managed to rejoice until I noticed the PHP tags on the page, from which I came to the conclusion that PHP was not interpreted, and was not interpreted. Actually, nothing is moving beyond this for the second day. I just did not do that. And Apache, along with PHP reinstalled, and added addHandler to .htaccess, and I do not even remember what else.
In order to avoid some questions I will answer in advance:
Yes, in php.ini short_open_tags is On
Yes, the php.ini engine is set to On
Yes, I wrote a2enmod php5. Yes, he says that this module is already installed
Yes, error.log Apache checked. The only thing that was there was a PHP warning. But they, just in case, also corrected. Did not help.
[Sat Dec 10 06:44:35.813718 2016] [mpm_prefork:notice] [pid 5131] AH00163: Apache/2.4.10 (Debian) OpenSSL/1.0.1t configured — resuming normal operations [Sat Dec 10 06:44:35.813749 2016] [core:notice] [pid 5131] AH00094: Command line: '/usr/sbin/apache2' [Sat Dec 10 06:47:04.305111 2016] [:error] [pid 5490] [client 95.213.177.123:45119] script '/var/www/html/azenv.php' not found or unable to stat, referer: https://proxyradar.com/ [Sat Dec 10 07:50:39.805186 2016] [mpm_prefork:notice] [pid 5131] AH00173: SIGHUP received. Attempting to restart [Sat Dec 10 07:50:39.837360 2016] [mpm_prefork:notice] [pid 5131] AH00163: Apache/2.4.10 (Debian) OpenSSL/1.0.1t configured — resuming normal operations [Sat Dec 10 07:50:39.837396 2016] [core:notice] [pid 5131] AH00094: Command line: '/usr/sbin/apache2' Thanks in advance to everyone for the answers!
sudo service apache2 restartorsudo /etc/init.d/apache2 restart? - E_pphp5 -vaphp -v;) - E_p