Creating and customizing your site is a pleasant moment for webmasters. But sometimes they may encounter an error. What it means and how to eliminate it, you will learn by reading this article. (Further…)
Category: Web Server
Set up a server for hosting sites. Answers to questions about how to configure apache and php, or nginx.
We create users for the web server
It would seem that it could be easier than adding a user to the server? I typed the adduser
command in the console, answered a couple of questions about the password and other information, and here, you can log in with the received login and password, place files, etc.
Then, manually, you have to create folders. For example, one for the site. The other is for temporary files, so as not to drop them into general / tmp for protection purposes. One more - for sessions if the caching in Redis is not configured. You also need to copy the necessary configuration files, such as the public ssh key for authentication .
How to exclude IP from logs in nginx?
Imagine a situation: you have a static ip and you do a lot and do a lot of time editing the site. At the same time, you still need to monitor, periodically, the logs for errors in queries, or for vulnerability scans. And the presence of a large number of records with your IP makes it difficult to view logs.
With the help of a conditional entry that is available in nginx, starting with version 1.7.0, we can check the visitor's ip and not record it in the log files. Indeed, why do this if logging your ip is not necessary?
How to configure Redis as a caching server
Caching data in RAM via Redis is one of the methods to speed up the site. This storage is highly efficient and can be used to cache not only sites, but also sessions, as well as a non-relational database.
(Further…)
Installing php 7.0.5 on debian
While some put php 5.3 , getting it out of the grave, I decided not to lag behind the whole planet, where the sites are translated to the seventh version of php, which is so much praised on the Internet, including high speed, and installed it from the DotDeb repository today. I must say, the increase in speed is really noticeable. My websites and WordPress, and MODX began to fly yet. :) That's how I did the migration.
Enable http2 support on a server with nginx and Debian
HTTP / 2 is the second version of the http network protocol, which includes many different improvements. These include multiplexing requests (all requests can be processed in parallel), increased performance, header compression, etc.
HTTP / 2 has replaced SPDY, which has been discontinued.
Nginx supports the http / 2 protocol, starting with version 1.9.5. However, only version 1.6.2 is present in the stable release of Debian Jessie. Therefore, we will connect the backports repository to upgrade nginx to 1.9.10.
(Further…)
Installing apache and php on debian
Certain content management systems do not work with the nginx and php-fpm combination , and require an apache web server with the php module. The most common reason for this is the need to use the rewrite module for the site to work.
Replacing mod_rpaf with mod_remoteip in Apache 2.4
Today I updated Debian to Jessie on my server and found a problem: the mod_rpaf module did not display the correct client ip address, instead ip 127.0.0.1 was displayed when proxying requests from nginx to apache.
XCache setup
xCache is a php bytecode caching program to speed up script execution. Like, for example, eAccelerator or PHP-APC.
Installing php 5.3 on debian 7
It so happens that in a fresh Debian distribution you may need an old version of php, which is not part of a stable distribution branch. For example, php 5.3 for running a site on a server with Debian Jessie.
To fully resolve dependencies, in addition to php, install apache packages that are relevant to the previous stable distribution of Debian.