C
C
carbanak012021-07-07 16:16:53
Nginx
carbanak01, 2021-07-07 16:16:53

Error with domain name in ubuntu hosts file and nginx?

Hello!
Interested in the question: why can not create a domain name app for 127.0.0.1 ?

In ubuntu file /etc/hosts I added the following line 127.0.0.1 app
In nginx config file I added the following:

server {
listen 127.0.0.1:80;
server_name app;

root /var/www/app;

index index.html index.htm index.php;

location ~ \.php$ {
include fastcgi_params;
include fastcgi.conf;

fastcgi_pass 127.0.0.1:9000;
}
}


I enter in the address bar FireFox app/ , the page comes out with the error "Connection attempt failed"

When I change app to test, everything works.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question