The default logs are saved under the direction:/var/log
unless you have a different configuration to the default.My recommendation out of the question would be to change the redaction of your question, as I could receive votes against and be deleted. Good luck.
There was a clear mistake in SQL's query, and it's just that you were making concatenation and in the queries you don't need concatenation, please I ask you to try the code and let us know what kind of error you throw afterwards. I'll be waiting for your answer.<?php session_start();
include("../conecta.php");
/* comprobar la conexión */
$nom=$_SESSION['usuario'];
$apellidos=$usuario['apellidos'];
$nomcomp=$nom ." ".$apellidos;
/* cerrar la conexión */
//Conecto a mi base de datos
//Cadena de consulta que me devuelve todos los registros de la tabla 'users'
$query = "SELECT apellidos FROM registro WHERE usuario = $_SESSION['usuario']";
//Ejecuto la query para obtener los resultados de la cadena de consulta en la variable $query
if($result = mysqli_query($link, $query)):
//la variable $user contiene el contenido de $result en un array asociativo
while($usuario = mysqli_fetch_assoc($result)):
echo $usuario['apellidos'];
endwhile;
mysqli_free_result($result);
endif;
/* liberar el conjunto de resultados */
if($nom == null || $nom='')
{
echo "<link rel='stylesheet' type='text/css' href='../css/style.css'>
<center><br><br><h1><b><font color='#ff8c00'>Usuario no identificado favor de iniciar sesion</font></b></h1><br><br><br><a href='../index.html'><font color='#ff8c00'><h2>Regresar</h2></a></center>";
die();
}
date_default_timezone_set('America/Mexico_City');
$fecha=strftime('%d-%m-%Y',time());
?>
For UI to work at Docker, you can create a simpler configuration consisting of only one of them. nginxbut to be used https://docs.docker.com/develop/develop-images/multistage-build/ ♪Dockerfile:FROM node:latest as build
ENV NODE_ENV=production
WORKDIR /usr/src/app
COPY ["package.json", "package-lock.json*", "./"]
RUN npm install --production --silent && mv node_modules ../
COPY . .
RUN ["npm", "run", "build"]
FROM nginx:alpine as base
EXPOSE 80
COPY --from=build /usr/src/app/build /usr/share/nginx/html
CMD ["nginx", "-g", "daemon off;"]
In the first phase (stage) we gather ours. ReactJS Annex, after which it is in the folder /usr/src/app/build♪ And then we just dig him up. nginx♪ It'll also be a default configuration. Also, if it's just for the test, I don't think you're going to have to get excited about SSL, because it's gonna require self-signed certificates that don't trust the browsers in silence, and the site won't open (this will have to change the browser or OS designs). But if it's interesting, how can it be written? https://www.digitalocean.com/community/tutorials/how-to-create-a-self-signed-ssl-certificate-for-nginx-in-ubuntu-18-04 and https://stackoverflow.com/questions/7580508/getting-chrome-to-accept-self-signed-localhost-certificate ♪docker-compose.ymlversion: '3'
services:
app:
build: ./react-app
ports:
- "80:80"
I may be mistaken but, the correct syntax is with the body in tiny: res.body Check if you are sending the body through res.send(req.body) to access through response
I mean, client_max_body_size 5g; I need to add to the nginx'a configuration, not to the nginx through docker launch configuration. Section Proxy-wide https://hub.docker.com/r/jwilder/nginx-proxy Additional constructions can be downloaded by placing an additional file in the /etc/nginx/conf.d/ with expansion *.conf♪ So, there's a file. my_conf.conf with such contents:client_max_body_size 5m;
You can start a team after that.docker run -d -p 80:80 -p 443:443 -v $(pwd)/my_conf.conf:/etc/nginx/conf.d/my_conf.conf:ro -v /var/run/docker.sock:/tmp/docker.sock:ro jwilder/nginx-proxy
P.S. draw attention to the fact that $(pwd)/my_conf.conf - it's a relative path, because it's the same way to get out of the same directory. my_conf.conf
The status code Nginx records in the log indicates that it was disconnected from the client before starting to send a response from Nginx. There is no such specification in Apache. http://d.hatena.ne.jp/hiroi10/20130306/1362591114 https://forum.nginx.org/read.php?2,219411,219421 In this case you fwrite() after sending a request, without waiting for the response fclose() It seems that it is caught in this specification because it is closed. HOMENginx, as in theのML response proxy_ignore_client_abort or fastcgi_ignore_client_abort Disable this check by specifying the option切断ly receive the response and then disconnect itI think that it will be useful. Is it difficult for the latter to be asynchronous?However, it is not waiting for the processing of. fsockopen() + fwrite() Nginx can take a long time because it runs実行hronously. Example http://php.net/manual/ja/function.fsockopen.php The 5th argument is 30, so wait for up to 30 seconds until you can connect.If you want to be asynchronous, you will need a hack such as curl, wget, or another PHP script. I think it’s funny when it takes 30 seconds, and it’s time out shorter. https://stackoverflow.com/a/963019/2818869 In addition, the following request is sent in the code written in the question.GET /analytics?aflag=on HTTP/1.1
HOST: 192.168.xx.xx
User-Agent: PHP/5.4
Content-Type: application/x-www-form-urlencoded
Content-Length: 8
Connection: Close
aflag=on
GET request does not use the body part. So the following request is sufficient.GET /analytics?aflag=on HTTP/1.1
HOST: 192.168.xx.xx
User-Agent: PHP/5.4
Connection: Close
The most logical thing to do is... http://www.- maintain the logs for the selected site in the same user ' s home catalogue, stored and stored in the home catalogue docroot The website itself.quite often emerging practices:# mkdir /домашний/каталог/пользователя/{logs,www}
Catalogue logs website logs retained in the catalogue www ♪ docroot website.supplementLocation (and number of details) of log files may be indicated in the relevant virtualhost-e: http://httpd.apache.org/docs/2.2/mod/mod_log_config.html#customlog https://httpd.apache.org/docs/2.2/logs.html#errorlog https://httpd.apache.org/docs/2.2/logs.html#accesslog https://wiki.apache.org/httpd/ExampleVhosts
The error says that nginx cannot find a /etc/nginx/sites-enabled/project.If /etc/nginx/sites-available/project exists, create symlink on it in /etc/nginx/sites-enabled, thus activating the site.If not, you decide what to do. Either create your own site and reset the nginx. Either if you don't need a project as such, wipe out the corresponding nginx configuration.
Boolean may be true or false.
The removable type usually stores the meaning of a statement. For example:A - луна квадратная = false
B - Кнопка нажата
С - Окно открыто
D - Провод подсоединен
A = false (for understandable reasons) is therefore a constant indicating the status of the Moon (it is not square).
B, C, D, not constants, and we can take and give meanings, and for A, we can only take significance.C = B И C
We open the window if we press the button (B) and connect the wire (D)Conclusion: Boolean variables play a role https://ru.wikipedia.org/wiki/%D0%A4%D0%BB%D0%B0%D0%B3_(%D0%BA%D0%BE%D0%BC%D0%BF%D1%8C%D1%8E%D1%82%D0%B5%D1%80%D0%BD%D0%B0%D1%8F_%D1%82%D0%B5%D1%85%D0%BD%D0%B8%D0%BA%D0%B0) characteristics.In your example, boolean found is the flag of what was found.if (found) // Сравнение found с константой true. Эквивалентно found == true
Sysem.out.println("Нашли!");
Works like this:Значение найдено?
Да! -Печатаем на экран
Нет, значит идем дальше.
So full of them, just looking badly. It's not always possible to adjust flexibly, but the limited functioning of popular control panels is affected. That's what I know from Apache and Nginx:
Ru-Center, Beget, Masterhost.ru, Rusonyx.ru, Sprinthost.ru, Unihost.com, Timeweb.
There's Elasticweb, only Nginx.
So that's a simple solution, after which the user can edit the configuration at his discretion ( https://logging.apache.org/log4j/2.0/faq.html ) LoggerContext context = (org.apache.logging.log4j.core.LoggerContext) LogManager.getContext(false);
File file = new File(PATH, LOG_FILE);
context.setConfigLocation(file.toURI());
The only thing I had in the resource to keep log4j2.xml with the next contents. <?xml version="1.0" encoding="UTF-8"?>
<Configuration>
</Configuration>To get rid of a mistake that never disappeared, but it worked.ERROR StatusLogger No log4j2 configuration file found. Using default configurat
введите сюда код
Choosing time intervals with regular expressions from the log-fail is a difficult task.I'd like to use it. awk♪In accordance with https://stackoverflow.com/questions/7706095/filter-log-file-entries-based-on-date-range You can try to do this: awk -vDate='2018-02-15 14:59:17' -vDate2='2018-03-15 14:59:17' '{split($1, d, ".");logDate=d[3]"-"d[2]"-"d[1]" "$2;if (logDate > Date && logDate < Date2) print $0}' message.log
The main task here is to transform the date into a "right" format "yyyyy-mm-dd." Since the date in the log file is dd.mm.yyyyy, the dates will not be comparable as lines (or convert to timestamp). I mean, it's gonna work out, but it's gonna be a bad result.So for the programme awk Set the time limits (translated Date and Date2) in the format of YYYYY-mm-dd HH:MM:SS) and, to the same format, give the date from the file log (fusion split) and then check that date with the range.I don't know how good it is to compare dates as rows in this case, but if you wish, you can pre-arrange the values at timestamp.
In order to resolve the cross of home requests to servers, we're producing two headings in response.w.Header().Set("Access-Control-Allow-Origin", "*")
w.Header().Set("Access-Control-Allow-Methods", "GET, POST, OPTIONS")