This article describes how to configure a secondary domain name on an Apache server in a Linux environment. Share with you for your reference, the details are as follows: (Take the domain name www.csdn.net as an example, now you need to configure a secondary domain name blog.csdn.net to point to the host address) First, make sure to enable the mod_rewrite module in the Apache configuration file httpd.conf: Here is a brief introduction to this module:
Add a secondary domain name resolution that needs to be configured: Then add the following domain name configuration at the end of the Apache configuration file httpd.conf: <VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /usr/local/apache/htdocs ServerName www.csdn.net ServerAlias www.csdn.net csdn.net DirectoryIndex index.php index.html index.htm </VirtualHost> <VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /usr/local/apache/htdocs/blog ServerName blog.csdn.net ServerAlias blog.csdn.net DirectoryIndex index.php index.html index.htm </VirtualHost> Restart Apache, and then the secondary domain name such as blog.csdn.net can be accessed I hope this article will help you configure your Linux server. You may also be interested in:
|
>>: How to use axios request in Vue project
Table of contents 1. Replace the apply method, ge...
First, the principle of esp8266 publishes message...
Preface It is very simple to create a server in n...
Table of contents Table/index.js Table/model/inde...
Table of contents As a global variable Variable H...
This article records the detailed installation tu...
Table of contents Integrity constraints Definitio...
With the right settings, you can force Linux user...
Table of contents 1. React.FC<> 2. class xx...
vue-cli uses stimulsoft.reports.js (nanny-level t...
1. System Configuration 1. Turn off sudo password...
Flash enabled designers and developers to deliver...
Introduction The meta tag is an auxiliary tag in ...
Today I have nothing to do, so I listed some tool...
Table of contents 1. Enter a directory and create...