How can I shield the server IP address from others' domain name resolution? I have encountered a problem. could you please help me? recently, my website IP address has been resolved by another domain name and can be accessed? how can I prevent other domain names from resolving the IP address of my website ,, I have queried some information and said that the host header can solve this problem. how can I configure the host header or use other methods? I hope I can ask for help. how can I shield the server IP address from others' domain name resolution?
I have encountered a problem. could you please help me? recently, my website IP address has been resolved by another domain name and can be accessed? how can I prevent other domain names from resolving the IP address of my website ,, I have queried some information and said that the host header can solve this problem. how can I configure the host header or use other methods? I hope I can take care of myself as a beginner. I am using an APACHE server ,! Thank you!
------ Solution --------------------
Add a VM and specify the ServerName.
By default, there is an advertisement on the host.
------ Solution --------------------
GOOGLE is faster than posting here
------ Solution --------------------
ServerName server name. It is used to create URL redirection. ServerName is one of the tags used by the apache server to identify access requests. it does not have to be the same as the actual IP address or DNS name. You can also leave this parameter unspecified. in this case, apache tries to use an IP address as the request flag. You can also leave the port unspecified.
Example: ServerName www.example.com: 80
Change the httpd. conf file
------ Solution --------------------
Httpd can be modified. conf file. you may need to use php or js to load most files on your website. for example, add
If ($ _ SERVER ['server _ name']! = 'Your website domain name ')
{
Echo "cannot access me like this"; // do something
Exit;
}
?>
------ Solution --------------------
Rewrite the domain name to overwrite other domain names that are not your own domain name to your domain name.
------ Solution --------------------
ServerName *******
DocumentRoot/advertisement/
------ Solution --------------------
Is it not good for someone to connect to your host? If million people connect to me, I will send it.
------ Solution --------------------
Implementation on the 6th floor ....
------ Solution --------------------
Multiple domain names for one IP address
Modify httpd. conf
1. set the previous
......
Delete
2. Add at the end of httpd. conf
NameVirtualHost your IP address
3. bind the domain name and add it to the end of httpd. conf.
DocumentRoot: Your Website Directory
ServerName your domain name
Bind 2nd domain names
DocumentRoot: Your Website Directory
ServerName your domain name 2
4. Restart apache after saving
------ Solution --------------------
Multiple domain names for one IP address
Modify httpd. conf
1. set the previous
......
Delete
2. Add at the end of httpd. conf
NameVirtualHost your IP address
3. bind the domain name and add it to the end of httpd. conf.
DocumentRoot: Your Website Directory
ServerName your domain name
Bind 2nd domain names
DocumentRoot: Your Website Directory
ServerName your domain name 2
4. Restart apache after saving
======================================
I learned.
------ Solution --------------------
This reply is automatically sent and only used for display. it has no special effect.
The historical summary data from [fangjj] to 21:50:11 (excluding this post ):
Posts: 27 posts: 1300
Number of closed stickers: 14 points: 650
Uncompleted: 13 uncompleted: 650
Closing Rate: 51.85% closing rate: 50.00%
The landlord cheers
------ Solution --------------------
Discussion
Is it not good for someone to connect to your host? If million people connect to me, I will send it.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.