Answer the question
In order to leave comments, you need to log in
Windows hosts file for external IP address?
Good afternoon. Rented a server from DigitalOcean. There is no need to buy a domain.
Installed Nginx, PHP8.1-FPM
. I wanted to check how the server works and whether everything is configured correctly. To do this, I created a simple stub.
Nginx settings:
server {
listen 80;
listen [::]:80;
root /var/www/sample.test;
index index.php index.html;
server_name sample.test;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.(?!well-known).* {
deny all;
}
}
<тут-ip-ардес> sample.test
ERR_CONNECTION_REFUSED
. curl sample.test
, then everything works out as it should. 104.22.1.126 laravel.test
- produces a DNS resolution error. Those. the local computer through the laravel.test domain still reached the host Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question