Answer the question
In order to leave comments, you need to log in
Is it possible to tie a subdomain to Ip (without a domain)?
There is north 155.55.55.55 . There is no domain name. Reversal is simple on IP. I'm trying to create a subdomain. Made a "test" folder. It contains a project. Created a config for nginx
server {
charset utf-8;
client_max_body_size 128M; ## listen for ipv4
#listen [::]:80 default_server ipv6only=on; ## listen for ipv6
listen 80;
server_name 155.55.55.55.test;
# пробовал также и
# server_name test; - рузультат тот же!
root /var/www/html/test/web;
index index.php
listen 80;
server_name _;
root /var/www/html/project/web;
index index.php;
listen 82;
Answer the question
In order to leave comments, you need to log in
It is forbidden.
IPv4 is a unique 32-bit number, an IP address can be queried.
Domains, subdomains are text strings. They are transferred to some IP, to which the request is sent.
They don't mix.
To host several sites on one IP without domains, you can
As you were told in the comments, you can come up with any domain name, and write a correspondence between its name and IP in your host file . Make
server settings for this domain and when you contact you, you will be taken to the right place on the server.
In fact, you change the DNS with the host file, the site will only open from your computer. If this domain is registered or you use an existing name, then others will be able to open your site.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question