搭建Ubuntu操作系统Apache虚拟主机

阿帕契安装并运行后,你可配置它服务
多域使用虚拟主机.

创建布局

例子使用两个域名:域名1.com和域名2.com

  1. 在主目录中创建公共-html文件夹

    mkdir公共网站
  2. 面向每个域主机创建文件夹
    标准子文件夹集下命令创建
    公共文件夹,私有文件夹,日志文件夹,cgi-bin文件夹备份域名1.com
    域2.com

    mkdir -p public_html/domain1.com/{public,private,log,cgi-bin,backup} mkdir -p public_html/domain2.com/{public,private,log,cgi-bin,backup}

创建索引.html

公共文件夹内容由你决定,但此示例使用
简单HTML文件以便查虚拟主机工作

  1. 创建索引.html文件

    nano public_html/domain1.com/public/index.html
  2. 向索引.html文件添加下列代码:

    域1.com - 华体会足球软件
    

    域1.com

  3. 重复进程,使域名2.com有相似文件
    替换所有实例域1.com域2.com.

定义虚拟主机

基本结构为二域定义二
虚拟主机

重审名称主机

拥有虚拟主机时名词设置常引起混淆

每一接口和端口Apache设置监听
名情指令可定义指令一次
端口

Apache操作系统布局预设NamevidualHost
指令中端口.conf文件.

运行下命令查看内容端口.conf:

etc/ache2ports.conf

下输出值(除非您先前修改过)
文件 :

if you just更改端口或添加更多端口,你可能还不得不修改#/etc/apache2sites
            
             #SSL名虚拟主机尚未支持,
            

默认命名命令设置满足
当前- Apache应用名虚拟主机逻辑设置
HTTP请求连接80港所有可用接口

注解:默认命名指令置入
ports.conf是Ubuntu操作系统Apache布局新版前置
发布程序在默认 vhost设置相似

定义自定义虚拟主机

现在您准备添加自己的虚拟主机以便启动
服务域名

创建 vhost文件域

sudo nano /etc/apache2/sites-available/domain1.com.conf

内容显示如下:

# 置备注或评论于此##它将使未来数周更容易理解#域名:域名1.com#公开:/home/demo/public_html/domai1.com/
            
             #管理员邮件、服务器名(域名)和别名serverAdmin
             [email protected]服务器名域1.comServerAlias www.domae1.com#索引文件与文档根(公共文件存放地)
            

启动网站

启动网站如下:

sudo2ensite域1.com

输出命令如下:

网站域1.com安装运行/etc/init.d/ache2重加载启动

运行推荐命令 :

sudo/etc/init.d/ache2重加载

导航网站

测试域而不创建dNS区
互联网名服务器可修改主机文件
本地计算机包含数项映射dom'dmai1.com'
域2.com,其余归模云服务器公用IP
地址:

127.0.0.1局部主机#云服务器相关项 123.45.67.890域1.com 123.45.67.890www.domain1.com 123.45.67.890域2.com

宿主文件位置视OS加载
上你本地计算机

注解:测试前必须删除主机文件项
并使用网络名服务器实时dNS区和记录
无法消除它们可能导致你混淆
错误测试新建或修改公共DNS记录

有了这些修改测试目的,你可浏览到您的
网站浏览器显示本地计算机并显示公共/index.html文件内容

ServerAlias使用

注意 vost文件设置serverAliasif you haveddNS
正确搭建,您也可以使用该地址

稍后文章中将讨论强制使用一个或另一个地址
关于重写规则

重复进程为另一域

创建并启动域2.com,重复进程如下:

  1. 创建 vost文件

    sudo纳米/etc/ache2网站可用/域2.com# 输入域2.com细节
  2. 启动网站并重新启动Apache

    sudo2ensite域2.comsudo/etc/init.d/ache2重加载
  3. 导航第二域名 :

    https://domain2.com or https://www.domain2.com

您应该查看dmae2.com索引文件

视图日志文件

按 vosts文件定义,每个域都有自己的日志文件

列出您的域日志 :

ls /var/log/apache2/error-mydomainname.com.log

输出完全如预期

访问.log错误.log

默认 vhost文件

虽然你更改默认虚拟主机,但你还是留置
地点

如果有人输入云服务器IP地址,则服务对象
默认 vhosts文件内容
独立 vhostIP地址)

为何从 vost文件传送

Apache按字母顺序搜索已启动 vhost文件
无法为请求IP地址或域名查找它服务
上位位数( 偏取式 )

if you help或删除默认 vhost文件,则内容
域名1.com显示
alphabetically).

这个问题在规划网站时需要加以考虑想要个
特定域为默认值吗?需要IP地址吗
完全不同内容

设置管理员电子邮件地址

设置服务器管理员邮箱地址地址使用
设置服务器时出错时联系也是
服务器签名中显示,如果值设为Email公元前
段内定义阿帕契页脚.

ServerAdmin[email protected]

设置域名

设置域名(ServerName)虚拟主机可拥有
多别名serverAlias举个例子,你可以
域名.com和域名.net指针相同内容

服务器域名.com服务器Alias

注解:这不是重写规则,但域定义
服务内容不变(假设你设置dNS指针
云服务器IP

定义索引文件

定义索引文件(当域显示主页)
地址输入)ibjective使用
指向替代页或非标准主页

目录Index索引.html

注解:这不是重定向用户的好方法
可直接转到非指定页,例如域名.com/index.ph
时目录Index值只对输入域.com者有效

定义文档路径

定义域公共文件位置使用绝对路径
名中名

DocumentRoot /home/demo/public_html/domain.com/public

设置日志文件

设置日志级别和虚拟主机日志文件位置

LogLevel warn ErrorLog  /var/log/apache2/error-mydomainname.com.log CustomLog /var/log/apache2/access-mydomainname.com.log combined

定义错误文档

设置错误文档,用于所有标准错误
消息传递

错误文件404/errors404.html错误文件403/errors403.html

例子中公共目录中存有'errors'文件夹
每一个报错文档创建并放入报错文件夹上头
路径显示相对前定义文档Root文件夹

如果错误消息没有定义, Apache生成自己的错误页
自定义错误页面对用户比较友好,并可以按需定制
或少点,随你

定义阿帕契页脚

定义服务器标识符以具体说明服务器细节是否
显示于服务器生成错误页或索引列表中选项
开发邮箱

服务器签名On

细节层次签名配置 通过ServerTokens
无法设置虚拟主机文件Ubuntu操作系统Apache
布局正确设置为'/etc/ache2/conf.d/security'看
阿帕契配置#2LINK文章详解

服务器签名设置邮箱serverAdmin邮件
显示式

启动cgi-bin

启动自定义虚拟主机定义的cgi-bin位置
布局可保留cgi-bin文档root位置
需要

ScriptAlias /cgi-bin/ /home/demo/public_html/domain.com/cgi-bin/
            
             选项+ExecGI
            

设置目录选项

设置指定目录选项下例
启动FollowSymLinks选项公共目录
域名.com

选项后续SymLinks

下方是可设置的其他选项 :

目录浏览选项

关闭目录浏览使用-Indexs打开目录
浏览使用+Indexs

Objective-Indexes

sSI选项

启用或禁用服务器侧括号下示例禁止
.....

选项-囊括

symlinks选项

启动或禁用选项跟踪符号链接小心点
因为它可能导致安全风险
配置文件夹)

选项-后续SymLinks

symLinksif
跟踪SymLinksSymLinksfowerMatch指令允许符号链接
只有当链路所有者与所有者完全相同时才会跟踪
目标文件或目录系统
ownership/permissions).避免安全风险
简单跟踪符号链路指令可创建

.ht存取选项

设置允许倒置免阻塞.ht存取支持设为全
允许支持

允许重叠无

.htaccess特征启动程序,例如:

允许覆盖自定义索引

阿帕契
htaccess

允许覆盖
文档对不同特征有较多信息

记住保护.htaccess文件你可以做这个 通过
重命名为隐蔽和拒绝访问文件
从外部源码 :

AccessFileName .myobscurefilename
            
             
              需要全部拒绝
             
            

注解上例为Apache 2.4格式化if使用
2.2替换 需要全部拒绝
顺序允许,Deny从所有##atisfy
全部
.

无选项

无指定关闭所有可用选项

选项无

选项层次

可按目录设置选项指令,见
实例如下:

允许覆盖无选项允许全部覆盖

首选目录设置关闭所有选项并禁用
.ht存取支持所有目录

第二目录设置优于第一目录并允许
.ht存取支持域.com/公共目录

摘要

虚拟主机文件易用工具,但强效工具
我们推荐你输入一设置并测试输入
下个设置测试等

后你熟悉它后,你会看到自己拥有精密控制
遍历网络文件夹和文件


\r\n \r\n \r\n\r\n

domain1.com

\r\n
Baidu
map
\r\n \r\n\r\n3. Repeat the process so that you have a similar file for domain2.com.\r\n Replace all instances of `domain1.com` with `domain2.com`.\r\n\r\n\r\n\r\n### Define virtual hosts\r\n\r\nNow you have a basic structure for your two domains, you can define two\r\nvirtual hosts.\r\n\r\n### Review NameVirtualHost\r\n\r\nWith virtual hosts, the NameVirtualHost setting often causes confusion.\r\n\r\nEach interface and port on which Apache is set to listen needs a\r\nNameVirtualHost directive. You can define the directive only once per\r\nport.\r\n\r\nIn the Apache layout for the Ubuntu operating system there is a default NameVirtualHost\r\ndirective in the `ports.conf` file.\r\n\r\nRun the following command to look at the contents of `ports.conf`:\r\n\r\n cat /etc/apache2/ports.conf\r\n\r\nYou should get the following output (unless you've previously modified\r\nthe file):\r\n\r\n # If you just change the port or add more ports here, you will likely also\r\n # have to change the VirtualHost statement in\r\n # /etc/apache2/sites-enabled/000-default\r\n\r\n NameVirtualHost *:80\r\n Listen 80\r\n\r\n \r\n # SSL name based virtual hosts are not yet supported, therefore no\r\n # NameVirtualHost statement here\r\n Listen 443\r\n \r\n\r\nThe default NameVirtualHost setting satisfies the requirements at\r\npresent - Apache will apply named based virtual host logic and settings\r\nfor HTTP requests made on any available interface (\\*) at port 80.\r\n\r\n**Note**: The placement of the default NameVirtualHost directive in\r\n'ports.conf' is new to the Ubuntu operating system's Apache layout; prior\r\nreleases placed a similar setting in the default vhost.\r\n\r\n\r\n### Define custom virtual hosts\r\n\r\nNow you are ready to add your own virtual hosts so that you can start to\r\nserve your domains.\r\n\r\nCreate the vhost file for domain1:\r\n\r\n sudo nano /etc/apache2/sites-available/domain1.com.conf\r\n\r\nThe contents looks as follows:\r\n\r\n # Place any notes or comments you have here\r\n # It will make any customisation easier to understand in the weeks to come\r\n\r\n # domain: domain1.com\r\n # public: /home/demo/public_html/domain1.com/\r\n\r\n \r\n\r\n # Admin email, Server Name (domain name) and any aliases\r\n ServerAdmin webadmin@domain1.com\r\n ServerName domain1.com\r\n ServerAlias www.domain1.com\r\n\r\n\r\n # Index file and Document Root (where the public files are located)\r\n DirectoryIndex index.html\r\n DocumentRoot /home/demo/public_html/domain1.com/public\r\n\r\n\r\n # Custom log file locations\r\n LogLevel warn\r\n ErrorLog /var/log/apache2/error-mydomainname.com.log\r\n CustomLog /var/log/apache2/access-mydomainname.com.log combined\r\n\r\n \r\n\r\n\r\n### Enable the site\r\n\r\n\r\nEnable the site as follows:\r\n\r\n sudo a2ensite domain1.com\r\n\r\nThe output of the command is as follows:\r\n\r\n Site domain1.com installed; run /etc/init.d/apache2 reload to enable.\r\n\r\nRun the recommended command:\r\n\r\n sudo /etc/init.d/apache2 reload\r\n\r\n### Navigate to the site\r\n\r\nTo test the domain without creating a DNS zone and records on some\r\nInternet name servers, you can modify the '/etc/hosts' file on your\r\nlocal computer to include some entries mapping 'domain1.com',\r\n'domain2.com', and the rest to the demo Cloud Server's public IP\r\naddress:\r\n\r\n 127.0.0.1 localhost\r\n ...\r\n\r\n # entries related to the demo Cloud Server\r\n 123.45.67.890 domain1.com\r\n 123.45.67.890 www.domain1.com\r\n 123.45.67.890 domain2.com\r\n ...\r\n\r\nThe location of the 'hosts' file varies depending on what OS is loaded\r\non your local computer.\r\n\r\n**Note**: Entries in the 'hosts' file must be removed prior to testing\r\nand using live DNS zones and records created on Internet name servers.\r\nFailure to remove them might lead to confusion on your part and\r\ninaccurate tests of new or modified public DNS records.\r\n\r\nWith such changes made for testing purposes, you can navigate to your\r\nsite in a web browser on your local computer and the contents of public/index.html file is shown.\r\n\r\n### Use the ServerAlias\r\n\r\nNote that in the vhost file, you set a ServerAlias. If you have the DNS\r\nset up correctly, you can also use that address.\r\n\r\nWe'll talk about forcing one address or the other in a later article\r\nabout rewrite rules.\r\n\r\n\r\n### Repeat the process for the other domain\r\n\r\nTo create and enable domain2.com, repeat the process as follows:\r\n\r\n1. Create the vhost file:\r\n\r\n sudo nano /etc/apache2/sites-available/domain2.com\r\n ...\r\n # Enter the details for domain2.com as per the example shown above\r\n\r\n2. Enable the site and restart Apache:\r\n\r\n sudo a2ensite domain2.com\r\n ...\r\n sudo /etc/init.d/apache2 reload\r\n\r\n3. Navigate to the second domain:\r\n\r\n https://domain2.com\r\n or\r\n https://www.domain2.com\r\n\r\nYou should see the 'domain2.com' index file.\r\n\r\n\r\n### View log files\r\n\r\nAs defined in the vhosts file, each domain has its own log files.\r\n\r\nList the logs for your domains:\r\n\r\n ls /var/log/apache2/error-mydomainname.com.log\r\n\r\nThe output is exactly as expected:\r\n\r\n access.log error.log\r\n\r\n\r\n### Default vhost file\r\n\r\n\r\nAlthough you changed the default virtual host, you did leave it in\r\nplace.\r\n\r\nIf someone enters the IP address of the cloud server, they are served\r\nthe contents of that default vhosts file (if you did not set up a\r\nseparate vhost for the IP address).\r\n\r\nWhy are they served from that vhost file?\r\n\r\nApache searches the enabled vhost files in alphabetical order and if it\r\ncan't find one for the requested IP address or domain name, it serves\r\nthe first one (alphabetically).\r\n\r\nIf you had disabled or deleted the default vhost file, then the contents\r\nof domain1.com would be displayed (being before domain2.com\r\nalphabetically).\r\n\r\nThis is something to consider when planning your websites. Do you want a\r\nparticular domain to be the default? Do you want the IP address to have\r\ncompletely different content?\r\n\r\n\r\n### Set the admin email address\r\n\r\n\r\nSet the email address for the server administrator. This address is used\r\nif you set up the server to contact you when errors occur. It is also\r\nshown in the ServerSignature if its value is set to Email. (See the\r\nsection **Define Apache footers**.\r\n\r\n ServerAdmin webadmin@domain.com\r\n\r\n### Set the domain name\r\n\r\nSet the domain name (ServerName) for the virtual host. You can have as\r\nmany aliases (ServerAlias) as required. For example, you can have\r\ndomain.com and domain.net point to the same content.\r\n\r\n ServerName domain.com\r\n ServerAlias www.domain.com\r\n\r\n**Note**: This is not a rewrite rule, but the domains defined here\r\nwill serve the same content (assuming you have set the DNS to point to\r\nyour Cloud Server IP).\r\n\r\n\r\n### Define the index file\r\n\r\nDefine the index file (the home page that is shown when the domain\r\naddress is entered). This is useful if you have want the user to be\r\ndirected to an alternate page or to a nonstandard home page.\r\n\r\n DirectoryIndex index.html\r\n\r\n**Note**: This is not a good method for redirecting users because they\r\nmight go directly to a nonspecified page, such as domain.com/index.php,\r\nwhile the DirectoryIndex value works only for those entering domain.com.\r\n\r\n\r\n### Define the documents path\r\n\r\nDefine the location of the domain's public files. Use an absolute path\r\nname.\r\n\r\n DocumentRoot /home/demo/public_html/domain.com/public\r\n\r\n### Set the log files\r\n\r\nSet the log levels and the location for the virtual hosts' log files.\r\n\r\n LogLevel warn\r\n ErrorLog /var/log/apache2/error-mydomainname.com.log\r\n CustomLog /var/log/apache2/access-mydomainname.com.log combined\r\n\r\n\r\n### Define error documents\r\n\r\nSet the ErrorDocument, which is used for all the standard error\r\nmessages.\r\n\r\n ErrorDocument 404 /errors/404.html\r\n ErrorDocument 403 /errors/403.html\r\n\r\nIn this example, there is an 'errors' folder in the public directory.\r\nEach error document was created and placed in the errors folder. The\r\npaths shown are relative to the DocumentRoot folder defined previously.\r\n\r\nIf error messages are not defined, Apache generates its own error pages.\r\nCustom error pages are more user friendly and can be customized as much,\r\nor as little, as you want.\r\n\r\n### Define Apache footers\r\n\r\nDefine ServerSignature to specify whether the server details are\r\ndisplayed in any server-generated error pages or index lists. Options\r\nare On, Off, and Email.\r\n\r\n ServerSignature On\r\n\r\nThe level of detail in the signature is configured via ServerTokens,\r\nwhich cannot be set in the Virtual Hosts file. For the Ubuntu operating system's Apache\r\nlayout, this is properly set in '/etc/apache2/conf.d/security'. See the\r\nApache configuration \\#2 NEED LINK article for more details.\r\n\r\nIf ServerSignature is set to **Email**, the ServerAdmin email will be\r\ndisplayed.\r\n\r\n### Enable cgi-bin\r\n\r\nEnable the cgi-bin location as defined by the custom virtual hosts\r\nlayout. You can leave cgi-bin in the DocumentRoot location if you so\r\nwant.\r\n\r\n ScriptAlias /cgi-bin/ /home/demo/public_html/domain.com/cgi-bin/\r\n \r\n Options +ExecCGI\r\n \r\n\r\n\r\n### Set directory options\r\n\r\nSet the options for the specified directory. The following example\r\nenables the FollowSymLinks option for the public directory of\r\ndomain.com.\r\n\r\n Options FollowSymLinks\r\n\r\nFollowing are other options that you can set:\r\n\r\n\r\n#### Directory browsing option\r\n\r\nTo turn off directory browsing, use -Indexes. To turn on directory\r\nbrowsing, use +Indexes.\r\n\r\n Options -Indexes\r\n\r\n\r\n#### SSI option\r\n\r\nEnable or disable Server Side Includes. The following example disables\r\nit.\r\n\r\n Options -Includes\r\n\r\n#### Symlinks option\r\n\r\nEnable or disable the option to follow symlinks. Be careful with this\r\noption because it can lead to security risks (inadvertently linking to\r\nconfiguration folders).\r\n\r\n Options -FollowSymLinks\r\n\r\nYou can consider using the SymLinksIfOwnerMatch directive instead of\r\nFollowSymLinks. The SymLinksIfOwnerMatch directive allows symbolic links\r\nto be followed only if the owner of the link is identical to the owner\r\nof the target file or directory (in terms of Linux file system\r\nownership/permissions). This prevents many of the security risks that a\r\nsimple FollowSymlinks directive can create.\r\n\r\n#### .htaccess option\r\n\r\nSet AllowOverride to None to disable .htaccess support. Set it to All to\r\nallow support.\r\n\r\n AllowOverride None\r\n\r\nYou can also specify which .htaccess features to enable, such as:\r\n\r\n AllowOverride AuthConfig Indexes\r\n\r\nThe Apache\r\n[htaccess](https://httpd.apache.org/docs/2.2/howto/htaccess.html \"https://httpd.apache.org/docs/2.2/howto/htaccess.html\")\r\nand\r\n[AllowOverride](https://httpd.apache.org/docs/2.2/mod/core.html#allowoverride \"https://httpd.apache.org/docs/2.2/mod/core.html#allowoverride\")\r\ndocs have more information about the different features.\r\n\r\nRemember to specifically protect your .htaccess file. You can do this by\r\nrenaming it to something obscure and denying access access to the file\r\nfrom external sources:\r\n\r\n AccessFileName .myobscurefilename\r\n \r\n \r\n Require all denied\r\n \r\n \r\n\r\n**Note**: The preceding example is formatted for Apache 2.4. If using\r\n2.2, replace ** Require all denied\r\n ** with **Order Allow,Deny | Deny from all | Satisfy\r\nall**.\r\n\r\n\r\n#### No Options\r\n\r\nSpecify None to turn off all the available options.\r\n\r\n Options None\r\n\r\n#### Options hierarchy\r\n\r\nThe options directives can be set per directory, as shown in the\r\nfollowing example:\r\n\r\n AllowOverride None\r\n Options None\r\n\r\n AllowOverride All\r\n\r\nThe first directory setting would turn off all options and disable\r\n.htaccess support for all directories.\r\n\r\nHowever, the second directory setting would override the first and allow\r\n.htaccess support for the domain.com/public directory.\r\n\r\n\r\n### Summary\r\n\r\nThe virtual hosts file is an easy tool to use but a very powerful one.\r\nWe recommend that you enter one setting and then test it. Then enter the\r\nnext setting and test, and so on.\r\n\r\nAfter you become familiar with it, you will see you have fine control\r\nover all of your web folders and files.","opts":{"alwaysThrow":false,"compatibilityMode":false,"copyButtons":true,"correctnewlines":false,"markdownOptions":{"fences":true,"commonmark":true,"gfm":true,"ruleSpaces":false,"listItemIndent":"1","spacedTable":true,"paddedTable":true},"normalize":true,"lazyImages":true,"reusableContent":{"tags":{}},"safeMode":false,"settings":{"position":false},"theme":"light"},"terms":[{"_id":"636d314a7b2cc300312af862","term":"parliament","definition":"Owls are generally solitary, but when seen together the group is called a 'parliament'!"}],"variables":{"user":{},"defaults":[{"source":"security","_id":"641e10ffd239e90035bb5928","name":"api_key","type":"apiKey","apiSetting":"641e10fed239e90035bb5923"},{"source":"security","_id":"641e10ffd239e90035bb5927","name":"petstore_auth","type":"oauth2","apiSetting":"641e10fed239e90035bb5923"},null,{"source":"security","_id":"645a798c3273ad32563c4726","name":"noauthAuth","type":"http","scheme":"noauth","apiSetting":"645a798b3273ad32563c4724"}]},"dehydrated":{"toc":"","body":"

Now that Apache is installed and running, you can configure it to serve
\nmultiple domains by using virtual hosts.

\n

Create the layout

\n

This example uses two domains: domain1.com and domain2.com.

\n
    \n
  1. \n

    In your home directory, create a public_html folder:

    \n
    cd ~\nmkdir public_html\n
    \n
  2. \n
  3. \n

    For each domain that you want to host, create a folder with a
    \nstandard set of subfolders. The following commands create the
    \nfolders public, private, log, cgi-bin, and backup for domain1.com
    \nand domain2.com:

    \n
    mkdir -p public_html/domain1.com/{public,private,log,cgi-bin,backup}\nmkdir -p public_html/domain2.com/{public,private,log,cgi-bin,backup}\n
    \n
  4. \n
\n

Create index.html

\n

The content of the public folder is up to you, but this example uses a
\nvery simple HTML file so that you can check the virtual host's work.

\n
    \n
  1. \n

    For each domain, create an index.html file:

    \n
    nano public_html/domain1.com/public/index.html\n
    \n
  2. \n
  3. \n

    Add the following code to the index.html file:

    \n
    \n  \n    domain1.com
    \n  \n  \n\n    

    domain1.com

    \n
    Baidu
    \n\n
    \n
  4. \n
  5. \n

    Repeat the process so that you have a similar file for domain2.com.
    \nReplace all instances of domain1.com with domain2.com.

    \n
  6. \n
\n

Define virtual hosts

\n

Now you have a basic structure for your two domains, you can define two
\nvirtual hosts.

\n

Review NameVirtualHost

\n

With virtual hosts, the NameVirtualHost setting often causes confusion.

\n

Each interface and port on which Apache is set to listen needs a
\nNameVirtualHost directive. You can define the directive only once per
\nport.

\n

In the Apache layout for the Ubuntu operating system there is a default NameVirtualHost
\ndirective in the ports.conf file.

\n

Run the following command to look at the contents of ports.conf:

\n
cat /etc/apache2/ports.conf\n
\n

You should get the following output (unless you've previously modified
\nthe file):

\n
# If you just change the port or add more ports here, you will likely also\n# have to change the VirtualHost statement in\n# /etc/apache2/sites-enabled/000-default\n\nNameVirtualHost *:80\nListen 80\n\n\n    # SSL name based virtual hosts are not yet supported, therefore no\n    # NameVirtualHost statement here\n    Listen 443\n\n
\n

The default NameVirtualHost setting satisfies the requirements at
\npresent - Apache will apply named based virtual host logic and settings
\nfor HTTP requests made on any available interface (*) at port 80.

\n

Note: The placement of the default NameVirtualHost directive in
\n'ports.conf' is new to the Ubuntu operating system's Apache layout; prior
\nreleases placed a similar setting in the default vhost.

\n

Define custom virtual hosts

\n

Now you are ready to add your own virtual hosts so that you can start to
\nserve your domains.

\n

Create the vhost file for domain1:

\n
sudo nano /etc/apache2/sites-available/domain1.com.conf\n
\n

The contents looks as follows:

\n
# Place any notes or comments you have here\n# It will make any customisation easier to understand in the weeks to come\n\n# domain: domain1.com\n# public: /home/demo/public_html/domain1.com/\n\n\n\n  # Admin email, Server Name (domain name) and any aliases\n  ServerAdmin webadmin@domain1.com\n  ServerName  domain1.com\n  ServerAlias www.domain1.com\n\n\n  # Index file and Document Root (where the public files are located)\n  DirectoryIndex index.html\n  DocumentRoot /home/demo/public_html/domain1.com/public\n\n\n  # Custom log file locations\n  LogLevel warn\n  ErrorLog /var/log/apache2/error-mydomainname.com.log\n  CustomLog /var/log/apache2/access-mydomainname.com.log combined\n\n\n
\n

Enable the site

\n

Enable the site as follows:

\n
sudo a2ensite domain1.com\n
\n

The output of the command is as follows:

\n
Site domain1.com installed; run /etc/init.d/apache2 reload to enable.\n
\n

Run the recommended command:

\n
sudo /etc/init.d/apache2 reload\n
\n

Navigate to the site

\n

To test the domain without creating a DNS zone and records on some
\nInternet name servers, you can modify the '/etc/hosts' file on your
\nlocal computer to include some entries mapping 'domain1.com',
\n'domain2.com', and the rest to the demo Cloud Server's public IP
\naddress:

\n
127.0.0.1    localhost\n...\n\n# entries related to the demo Cloud Server\n123.45.67.890   domain1.com\n123.45.67.890   www.domain1.com\n123.45.67.890   domain2.com\n...\n
\n

The location of the 'hosts' file varies depending on what OS is loaded
\non your local computer.

\n

Note: Entries in the 'hosts' file must be removed prior to testing
\nand using live DNS zones and records created on Internet name servers.
\nFailure to remove them might lead to confusion on your part and
\ninaccurate tests of new or modified public DNS records.

\n

With such changes made for testing purposes, you can navigate to your
\nsite in a web browser on your local computer and the contents of public/index.html file is shown.

\n

Use the ServerAlias

\n

Note that in the vhost file, you set a ServerAlias. If you have the DNS
\nset up correctly, you can also use that address.

\n

We'll talk about forcing one address or the other in a later article
\nabout rewrite rules.

\n

Repeat the process for the other domain

\n

To create and enable domain2.com, repeat the process as follows:

\n
    \n
  1. \n

    Create the vhost file:

    \n
    sudo nano /etc/apache2/sites-available/domain2.com\n...\n# Enter the details for domain2.com as per the example shown above\n
    \n
  2. \n
  3. \n

    Enable the site and restart Apache:

    \n
    sudo a2ensite domain2.com\n...\nsudo /etc/init.d/apache2 reload\n
    \n
  4. \n
  5. \n

    Navigate to the second domain:

    \n
    https://domain2.com\nor\nhttps://www.domain2.com\n
    \n
  6. \n
\n

You should see the 'domain2.com' index file.

\n

View log files

\n

As defined in the vhosts file, each domain has its own log files.

\n

List the logs for your domains:

\n
ls /var/log/apache2/error-mydomainname.com.log\n
\n

The output is exactly as expected:

\n
access.log  error.log\n
\n

Default vhost file

\n

Although you changed the default virtual host, you did leave it in
\nplace.

\n

If someone enters the IP address of the cloud server, they are served
\nthe contents of that default vhosts file (if you did not set up a
\nseparate vhost for the IP address).

\n

Why are they served from that vhost file?

\n

Apache searches the enabled vhost files in alphabetical order and if it
\ncan't find one for the requested IP address or domain name, it serves
\nthe first one (alphabetically).

\n

If you had disabled or deleted the default vhost file, then the contents
\nof domain1.com would be displayed (being before domain2.com
\nalphabetically).

\n

This is something to consider when planning your websites. Do you want a
\nparticular domain to be the default? Do you want the IP address to have
\ncompletely different content?

\n

Set the admin email address

\n

Set the email address for the server administrator. This address is used
\nif you set up the server to contact you when errors occur. It is also
\nshown in the ServerSignature if its value is set to Email. (See the
\nsection Define Apache footers.

\n
ServerAdmin webadmin@domain.com\n
\n

Set the domain name

\n

Set the domain name (ServerName) for the virtual host. You can have as
\nmany aliases (ServerAlias) as required. For example, you can have
\ndomain.com and domain.net point to the same content.

\n
ServerName domain.com\nServerAlias www.domain.com\n
\n

Note: This is not a rewrite rule, but the domains defined here
\nwill serve the same content (assuming you have set the DNS to point to
\nyour Cloud Server IP).

\n

Define the index file

\n

Define the index file (the home page that is shown when the domain
\naddress is entered). This is useful if you have want the user to be
\ndirected to an alternate page or to a nonstandard home page.

\n
DirectoryIndex index.html\n
\n

Note: This is not a good method for redirecting users because they
\nmight go directly to a nonspecified page, such as domain.com/index.php,
\nwhile the DirectoryIndex value works only for those entering domain.com.

\n

Define the documents path

\n

Define the location of the domain's public files. Use an absolute path
\nname.

\n
DocumentRoot /home/demo/public_html/domain.com/public\n
\n

Set the log files

\n

Set the log levels and the location for the virtual hosts' log files.

\n
LogLevel warn\nErrorLog  /var/log/apache2/error-mydomainname.com.log\nCustomLog /var/log/apache2/access-mydomainname.com.log combined\n
\n

Define error documents

\n

Set the ErrorDocument, which is used for all the standard error
\nmessages.

\n
ErrorDocument 404 /errors/404.html\nErrorDocument 403 /errors/403.html\n
\n

In this example, there is an 'errors' folder in the public directory.
\nEach error document was created and placed in the errors folder. The
\npaths shown are relative to the DocumentRoot folder defined previously.

\n

If error messages are not defined, Apache generates its own error pages.
\nCustom error pages are more user friendly and can be customized as much,
\nor as little, as you want.

\n

Define Apache footers

\n

Define ServerSignature to specify whether the server details are
\ndisplayed in any server-generated error pages or index lists. Options
\nare On, Off, and Email.

\n
ServerSignature On\n
\n

The level of detail in the signature is configured via ServerTokens,
\nwhich cannot be set in the Virtual Hosts file. For the Ubuntu operating system's Apache
\nlayout, this is properly set in '/etc/apache2/conf.d/security'. See the
\nApache configuration #2 NEED LINK article for more details.

\n

If ServerSignature is set to Email, the ServerAdmin email will be
\ndisplayed.

\n

Enable cgi-bin

\n

Enable the cgi-bin location as defined by the custom virtual hosts
\nlayout. You can leave cgi-bin in the DocumentRoot location if you so
\nwant.

\n
ScriptAlias /cgi-bin/ /home/demo/public_html/domain.com/cgi-bin/\n\n  Options +ExecCGI\n\n
\n

Set directory options

\n

Set the options for the specified directory. The following example
\nenables the FollowSymLinks option for the public directory of
\ndomain.com.

\n
  Options FollowSymLinks\n
\n

Following are other options that you can set:

\n

Directory browsing option

\n

To turn off directory browsing, use -Indexes. To turn on directory
\nbrowsing, use +Indexes.

\n
Options -Indexes\n
\n

SSI option

\n

Enable or disable Server Side Includes. The following example disables
\nit.

\n
Options -Includes\n
\n

Symlinks option

\n

Enable or disable the option to follow symlinks. Be careful with this
\noption because it can lead to security risks (inadvertently linking to
\nconfiguration folders).

\n
Options -FollowSymLinks\n
\n

You can consider using the SymLinksIfOwnerMatch directive instead of
\nFollowSymLinks. The SymLinksIfOwnerMatch directive allows symbolic links
\nto be followed only if the owner of the link is identical to the owner
\nof the target file or directory (in terms of Linux file system
\nownership/permissions). This prevents many of the security risks that a
\nsimple FollowSymlinks directive can create.

\n

.htaccess option

\n

Set AllowOverride to None to disable .htaccess support. Set it to All to
\nallow support.

\n
AllowOverride None\n
\n

You can also specify which .htaccess features to enable, such as:

\n
AllowOverride AuthConfig Indexes\n
\n

The Apache
\nhtaccess
\nand
\nAllowOverride
\ndocs have more information about the different features.

\n

Remember to specifically protect your .htaccess file. You can do this by
\nrenaming it to something obscure and denying access access to the file
\nfrom external sources:

\n
AccessFileName .myobscurefilename\n\n    \n    Require all denied\n    \n\n
\n

Note: The preceding example is formatted for Apache 2.4. If using
\n2.2, replace Require all denied
\n
with Order Allow,Deny | Deny from all | Satisfy
\nall
.

\n

No Options

\n

Specify None to turn off all the available options.

\n
Options None\n
\n

Options hierarchy

\n

The options directives can be set per directory, as shown in the
\nfollowing example:

\n
  AllowOverride None\n  Options None\n\nAllowOverride All\n
\n

The first directory setting would turn off all options and disable
\n.htaccess support for all directories.

\n

However, the second directory setting would override the first and allow
\n.htaccess support for the domain.com/public directory.

\n

Summary

\n

The virtual hosts file is an easy tool to use but a very powerful one.
\nWe recommend that you enter one setting and then test it. Then enter the
\nnext setting and test, and so on.

\n

After you become familiar with it, you will see you have fine control
\nover all of your web folders and files.

"}},"doc":{"metadata":{"image":[],"title":"","description":"","keywords":"","robots":"index"},"api":{"method":"get","url":"","auth":"required","params":[]},"next":{"description":"","pages":[]},"algolia":{"recordCount":28,"publishPending":false,"updatedAt":"2023-09-07T08:02:08.617Z"},"title":"Set up Apache virtual Hosts on the Ubuntu Operating System","icon":"","updates":[],"type":"basic","slug":"set-up-apache-virtual-hosts-on-the-ubuntu-operating-system","excerpt":"","body":"Now that Apache is installed and running, you can configure it to serve\r\nmultiple domains by using *virtual hosts*.\r\n\r\n### Create the layout\r\n\r\nThis example uses two domains: domain1.com and domain2.com.\r\n\r\n1. In your home directory, create a public\\_html folder:\r\n\r\n cd ~\r\n mkdir public_html\r\n\r\n2. For each domain that you want to host, create a folder with a\r\n standard set of subfolders. The following commands create the\r\n folders public, private, log, cgi-bin, and backup for domain1.com\r\n and domain2.com:\r\n\r\n mkdir -p public_html/domain1.com/{public,private,log,cgi-bin,backup}\r\n mkdir -p public_html/domain2.com/{public,private,log,cgi-bin,backup}\r\n\r\n### Create index.html\r\n\r\nThe content of the public folder is up to you, but this example uses a\r\nvery simple HTML file so that you can check the virtual host's work.\r\n\r\n1. For each domain, create an index.html file:\r\n\r\n nano public_html/domain1.com/public/index.html\r\n\r\n2. Add the following code to the index.html file:\r\n\r\n \r\n \r\n domain1.com \r\n \r\n \r\n\r\n

domain1.com

\r\n
Baidu
map
\r\n \r\n\r\n3. Repeat the process so that you have a similar file for domain2.com.\r\n Replace all instances of `domain1.com` with `domain2.com`.\r\n\r\n\r\n\r\n### Define virtual hosts\r\n\r\nNow you have a basic structure for your two domains, you can define two\r\nvirtual hosts.\r\n\r\n### Review NameVirtualHost\r\n\r\nWith virtual hosts, the NameVirtualHost setting often causes confusion.\r\n\r\nEach interface and port on which Apache is set to listen needs a\r\nNameVirtualHost directive. You can define the directive only once per\r\nport.\r\n\r\nIn the Apache layout for the Ubuntu operating system there is a default NameVirtualHost\r\ndirective in the `ports.conf` file.\r\n\r\nRun the following command to look at the contents of `ports.conf`:\r\n\r\n cat /etc/apache2/ports.conf\r\n\r\nYou should get the following output (unless you've previously modified\r\nthe file):\r\n\r\n # If you just change the port or add more ports here, you will likely also\r\n # have to change the VirtualHost statement in\r\n # /etc/apache2/sites-enabled/000-default\r\n\r\n NameVirtualHost *:80\r\n Listen 80\r\n\r\n \r\n # SSL name based virtual hosts are not yet supported, therefore no\r\n # NameVirtualHost statement here\r\n Listen 443\r\n \r\n\r\nThe default NameVirtualHost setting satisfies the requirements at\r\npresent - Apache will apply named based virtual host logic and settings\r\nfor HTTP requests made on any available interface (\\*) at port 80.\r\n\r\n**Note**: The placement of the default NameVirtualHost directive in\r\n'ports.conf' is new to the Ubuntu operating system's Apache layout; prior\r\nreleases placed a similar setting in the default vhost.\r\n\r\n\r\n### Define custom virtual hosts\r\n\r\nNow you are ready to add your own virtual hosts so that you can start to\r\nserve your domains.\r\n\r\nCreate the vhost file for domain1:\r\n\r\n sudo nano /etc/apache2/sites-available/domain1.com.conf\r\n\r\nThe contents looks as follows:\r\n\r\n # Place any notes or comments you have here\r\n # It will make any customisation easier to understand in the weeks to come\r\n\r\n # domain: domain1.com\r\n # public: /home/demo/public_html/domain1.com/\r\n\r\n \r\n\r\n # Admin email, Server Name (domain name) and any aliases\r\n ServerAdmin webadmin@domain1.com\r\n ServerName domain1.com\r\n ServerAlias www.domain1.com\r\n\r\n\r\n # Index file and Document Root (where the public files are located)\r\n DirectoryIndex index.html\r\n DocumentRoot /home/demo/public_html/domain1.com/public\r\n\r\n\r\n # Custom log file locations\r\n LogLevel warn\r\n ErrorLog /var/log/apache2/error-mydomainname.com.log\r\n CustomLog /var/log/apache2/access-mydomainname.com.log combined\r\n\r\n \r\n\r\n\r\n### Enable the site\r\n\r\n\r\nEnable the site as follows:\r\n\r\n sudo a2ensite domain1.com\r\n\r\nThe output of the command is as follows:\r\n\r\n Site domain1.com installed; run /etc/init.d/apache2 reload to enable.\r\n\r\nRun the recommended command:\r\n\r\n sudo /etc/init.d/apache2 reload\r\n\r\n### Navigate to the site\r\n\r\nTo test the domain without creating a DNS zone and records on some\r\nInternet name servers, you can modify the '/etc/hosts' file on your\r\nlocal computer to include some entries mapping 'domain1.com',\r\n'domain2.com', and the rest to the demo Cloud Server's public IP\r\naddress:\r\n\r\n 127.0.0.1 localhost\r\n ...\r\n\r\n # entries related to the demo Cloud Server\r\n 123.45.67.890 domain1.com\r\n 123.45.67.890 www.domain1.com\r\n 123.45.67.890 domain2.com\r\n ...\r\n\r\nThe location of the 'hosts' file varies depending on what OS is loaded\r\non your local computer.\r\n\r\n**Note**: Entries in the 'hosts' file must be removed prior to testing\r\nand using live DNS zones and records created on Internet name servers.\r\nFailure to remove them might lead to confusion on your part and\r\ninaccurate tests of new or modified public DNS records.\r\n\r\nWith such changes made for testing purposes, you can navigate to your\r\nsite in a web browser on your local computer and the contents of public/index.html file is shown.\r\n\r\n### Use the ServerAlias\r\n\r\nNote that in the vhost file, you set a ServerAlias. If you have the DNS\r\nset up correctly, you can also use that address.\r\n\r\nWe'll talk about forcing one address or the other in a later article\r\nabout rewrite rules.\r\n\r\n\r\n### Repeat the process for the other domain\r\n\r\nTo create and enable domain2.com, repeat the process as follows:\r\n\r\n1. Create the vhost file:\r\n\r\n sudo nano /etc/apache2/sites-available/domain2.com\r\n ...\r\n # Enter the details for domain2.com as per the example shown above\r\n\r\n2. Enable the site and restart Apache:\r\n\r\n sudo a2ensite domain2.com\r\n ...\r\n sudo /etc/init.d/apache2 reload\r\n\r\n3. Navigate to the second domain:\r\n\r\n https://domain2.com\r\n or\r\n https://www.domain2.com\r\n\r\nYou should see the 'domain2.com' index file.\r\n\r\n\r\n### View log files\r\n\r\nAs defined in the vhosts file, each domain has its own log files.\r\n\r\nList the logs for your domains:\r\n\r\n ls /var/log/apache2/error-mydomainname.com.log\r\n\r\nThe output is exactly as expected:\r\n\r\n access.log error.log\r\n\r\n\r\n### Default vhost file\r\n\r\n\r\nAlthough you changed the default virtual host, you did leave it in\r\nplace.\r\n\r\nIf someone enters the IP address of the cloud server, they are served\r\nthe contents of that default vhosts file (if you did not set up a\r\nseparate vhost for the IP address).\r\n\r\nWhy are they served from that vhost file?\r\n\r\nApache searches the enabled vhost files in alphabetical order and if it\r\ncan't find one for the requested IP address or domain name, it serves\r\nthe first one (alphabetically).\r\n\r\nIf you had disabled or deleted the default vhost file, then the contents\r\nof domain1.com would be displayed (being before domain2.com\r\nalphabetically).\r\n\r\nThis is something to consider when planning your websites. Do you want a\r\nparticular domain to be the default? Do you want the IP address to have\r\ncompletely different content?\r\n\r\n\r\n### Set the admin email address\r\n\r\n\r\nSet the email address for the server administrator. This address is used\r\nif you set up the server to contact you when errors occur. It is also\r\nshown in the ServerSignature if its value is set to Email. (See the\r\nsection **Define Apache footers**.\r\n\r\n ServerAdmin webadmin@domain.com\r\n\r\n### Set the domain name\r\n\r\nSet the domain name (ServerName) for the virtual host. You can have as\r\nmany aliases (ServerAlias) as required. For example, you can have\r\ndomain.com and domain.net point to the same content.\r\n\r\n ServerName domain.com\r\n ServerAlias www.domain.com\r\n\r\n**Note**: This is not a rewrite rule, but the domains defined here\r\nwill serve the same content (assuming you have set the DNS to point to\r\nyour Cloud Server IP).\r\n\r\n\r\n### Define the index file\r\n\r\nDefine the index file (the home page that is shown when the domain\r\naddress is entered). This is useful if you have want the user to be\r\ndirected to an alternate page or to a nonstandard home page.\r\n\r\n DirectoryIndex index.html\r\n\r\n**Note**: This is not a good method for redirecting users because they\r\nmight go directly to a nonspecified page, such as domain.com/index.php,\r\nwhile the DirectoryIndex value works only for those entering domain.com.\r\n\r\n\r\n### Define the documents path\r\n\r\nDefine the location of the domain's public files. Use an absolute path\r\nname.\r\n\r\n DocumentRoot /home/demo/public_html/domain.com/public\r\n\r\n### Set the log files\r\n\r\nSet the log levels and the location for the virtual hosts' log files.\r\n\r\n LogLevel warn\r\n ErrorLog /var/log/apache2/error-mydomainname.com.log\r\n CustomLog /var/log/apache2/access-mydomainname.com.log combined\r\n\r\n\r\n### Define error documents\r\n\r\nSet the ErrorDocument, which is used for all the standard error\r\nmessages.\r\n\r\n ErrorDocument 404 /errors/404.html\r\n ErrorDocument 403 /errors/403.html\r\n\r\nIn this example, there is an 'errors' folder in the public directory.\r\nEach error document was created and placed in the errors folder. The\r\npaths shown are relative to the DocumentRoot folder defined previously.\r\n\r\nIf error messages are not defined, Apache generates its own error pages.\r\nCustom error pages are more user friendly and can be customized as much,\r\nor as little, as you want.\r\n\r\n### Define Apache footers\r\n\r\nDefine ServerSignature to specify whether the server details are\r\ndisplayed in any server-generated error pages or index lists. Options\r\nare On, Off, and Email.\r\n\r\n ServerSignature On\r\n\r\nThe level of detail in the signature is configured via ServerTokens,\r\nwhich cannot be set in the Virtual Hosts file. For the Ubuntu operating system's Apache\r\nlayout, this is properly set in '/etc/apache2/conf.d/security'. See the\r\nApache configuration \\#2 NEED LINK article for more details.\r\n\r\nIf ServerSignature is set to **Email**, the ServerAdmin email will be\r\ndisplayed.\r\n\r\n### Enable cgi-bin\r\n\r\nEnable the cgi-bin location as defined by the custom virtual hosts\r\nlayout. You can leave cgi-bin in the DocumentRoot location if you so\r\nwant.\r\n\r\n ScriptAlias /cgi-bin/ /home/demo/public_html/domain.com/cgi-bin/\r\n \r\n Options +ExecCGI\r\n \r\n\r\n\r\n### Set directory options\r\n\r\nSet the options for the specified directory. The following example\r\nenables the FollowSymLinks option for the public directory of\r\ndomain.com.\r\n\r\n Options FollowSymLinks\r\n\r\nFollowing are other options that you can set:\r\n\r\n\r\n#### Directory browsing option\r\n\r\nTo turn off directory browsing, use -Indexes. To turn on directory\r\nbrowsing, use +Indexes.\r\n\r\n Options -Indexes\r\n\r\n\r\n#### SSI option\r\n\r\nEnable or disable Server Side Includes. The following example disables\r\nit.\r\n\r\n Options -Includes\r\n\r\n#### Symlinks option\r\n\r\nEnable or disable the option to follow symlinks. Be careful with this\r\noption because it can lead to security risks (inadvertently linking to\r\nconfiguration folders).\r\n\r\n Options -FollowSymLinks\r\n\r\nYou can consider using the SymLinksIfOwnerMatch directive instead of\r\nFollowSymLinks. The SymLinksIfOwnerMatch directive allows symbolic links\r\nto be followed only if the owner of the link is identical to the owner\r\nof the target file or directory (in terms of Linux file system\r\nownership/permissions). This prevents many of the security risks that a\r\nsimple FollowSymlinks directive can create.\r\n\r\n#### .htaccess option\r\n\r\nSet AllowOverride to None to disable .htaccess support. Set it to All to\r\nallow support.\r\n\r\n AllowOverride None\r\n\r\nYou can also specify which .htaccess features to enable, such as:\r\n\r\n AllowOverride AuthConfig Indexes\r\n\r\nThe Apache\r\n[htaccess](https://httpd.apache.org/docs/2.2/howto/htaccess.html \"https://httpd.apache.org/docs/2.2/howto/htaccess.html\")\r\nand\r\n[AllowOverride](https://httpd.apache.org/docs/2.2/mod/core.html#allowoverride \"https://httpd.apache.org/docs/2.2/mod/core.html#allowoverride\")\r\ndocs have more information about the different features.\r\n\r\nRemember to specifically protect your .htaccess file. You can do this by\r\nrenaming it to something obscure and denying access access to the file\r\nfrom external sources:\r\n\r\n AccessFileName .myobscurefilename\r\n \r\n \r\n Require all denied\r\n \r\n \r\n\r\n**Note**: The preceding example is formatted for Apache 2.4. If using\r\n2.2, replace ** Require all denied\r\n ** with **Order Allow,Deny | Deny from all | Satisfy\r\nall**.\r\n\r\n\r\n#### No Options\r\n\r\nSpecify None to turn off all the available options.\r\n\r\n Options None\r\n\r\n#### Options hierarchy\r\n\r\nThe options directives can be set per directory, as shown in the\r\nfollowing example:\r\n\r\n AllowOverride None\r\n Options None\r\n\r\n AllowOverride All\r\n\r\nThe first directory setting would turn off all options and disable\r\n.htaccess support for all directories.\r\n\r\nHowever, the second directory setting would override the first and allow\r\n.htaccess support for the domain.com/public directory.\r\n\r\n\r\n### Summary\r\n\r\nThe virtual hosts file is an easy tool to use but a very powerful one.\r\nWe recommend that you enter one setting and then test it. Then enter the\r\nnext setting and test, and so on.\r\n\r\nAfter you become familiar with it, you will see you have fine control\r\nover all of your web folders and files.","order":397,"isReference":false,"deprecated":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"reusableContent":[],"previousSlug":"","slugUpdatedAt":"2023-05-18T13:53:35.186Z","revision":7,"_id":"646644cbf8ef0d18bc8eda79","lastUpdatedHash":"10b9f95abfa893da08df91be6a12b010b55256d8","project":"636d314a7b2cc300312af861","user":"5af39863989da435b05d284e","category":{"title":"Public Cloud","slug":"public-cloud","order":9999,"reference":false,"_id":"64107a7fee1584001f61f947","project":"636d314a7b2cc300312af861","version":"636d314a7b2cc300312af866","createdAt":"2023-03-14T13:45:35.452Z","__v":0,"type":"guide","id":"64107a7fee1584001f61f947"},"createdAt":"2023-05-18T15:31:23.710Z","updatedAt":"2023-12-11T16:12:57.146Z","version":{"version":"1.0","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":true,"is_hidden":false,"is_deprecated":false,"categories":["636d314a7b2cc300312af868","636d314a7b2cc300312af868","6372011ade7b7600a2343971","63726bb1975454004c244cf0","6376be12127d9900031599e1","63774b1d9eef4a00e5b62f18","63ff1e02b3738700445b26b4","63ff83dd43c817007346d470","64107a6ff9a9400061fb465a","64107a750b81930011506490","64107a79fc13c0005ed4836d","64107a7c9cf8520011a62bd9","64107a7fee1584001f61f947","641082b90f3ef4000b43ef26","641e010c3515610d761cf71d","641e0fe685ebf8003c2ac2e9","641e1030fe15970059b83d7a","641e10fed239e90035bb5924","643976eb94d370000deca9c5","643eb4d1f195600074707bde","643edb1078e8af00581d6025","6446e6cd4c6c320012421eba","64471a0483c65f003cc90679","6447fa1204508d167ad74187","644acc292835070056a1ffc2","64512c3398180c0032bcebc2","64516fe83f49d100296cd1bd","645171e4f1fb03006c7ee494","6451751e0ac9da001158d36a","64518259f068f50477d88696","64528ac2439fe20018a1136d","64529bbd1df7160064bb4130","6452a2c25889bb0c1e2603c2","6452a5b8154b870116b0541c","6452a5d3173e670068a40e04","6452a5f3254968001a6a8591","6452a6785abf210bdfe90146","6452b20b90709a0e007dcd10","6452b55b5a587200583ffd21","6452d52eeccf7c03cc275a95","645374b2c2a2640527e72fa2","6453b5166cb45618d546ca72","645477a8f90ece004ad0f609","6454aee1a6984a002f419059","6454af754df037000a477f38","64550c22aed895000b35e4e5","64551057a6984a002f47639f","645531b975d48b11b616e04c","645539b8f98098150309e05b","645544ce03e4210923c460e0","645546ff818fde20d9540305","645547eb6c0fef1e25749bfd","645549398c26ca0825a54daa","6455499c590d5d004bed6ea4","64554a2643d50200424c949f","64554a49f549ec00603ffca9","64554a62e79d4d158bb7c7e6","6455542d375c23005fe8b0e6","64555468d1f36d1496d6cdc8","64555815aa3ef3004371a359","6455593a98a9f21f277c445e","645560f1397690015ef4605f","6455702c1fbcf7000aa29af8","6458746a53771c01d5540ea1","64587a7f5cc705003d964d2c","645882b110a29802bb76f633","6458a6b24e80bc00745061e5","6458c4a6b80425005fe1eab2","6458c7173e18d001d7e62202","6458d57d5aa615002563ce8b","6458d6aae642620012783f2b","64598b4afed949000a631205","6459f83ed3e7e41076e6f7ac","645a3186b28e5e1e83d7eb1a","645a69297458df011aa5e228","645a6e07e142ac003c199287","645a6ea1872f3e322bf9a1d3","645a798b3273ad32563c4725","645af6e9f35aa90ad1fd945f","645b585b6e8a3009c63793dd","645b9f6da30de608fe6a9a18","645ba1b6d34aea1c2d16b0e9","645cf4ad9fa1110a67ad1e44","6466c9be6219af0a2dce7bf6","6466df1311b66b09ca7824eb","646b7817157f4b0074ef0969","6476362675a20e0044c3806f","64763e486eb59e0074e36589","6476402c373b6d00239d7529","647641c860cf5f004b98257b","647670afde4a1500494a9afa","6476d61c7fb8dd000a4ba53e","6476df870c36a3004e86c355","64810347dea925001e9966a5","648173085c2c33002f3852ba","648174fe92e2fc0baa3e8257","648b1684be1002180b500145","6491634b44859c00253786f9","649d7050b8a47e003cc16e70","64e3258b6436f0002c5898d5","64e71501135f560041d1fe15","651592d5e816a81977972e97","6554f620ea420b004e5e098b","657b1ac6ee3b67003015b961","658a89e0d696ad001c089aa2"],"_id":"636d314a7b2cc300312af866","project":"636d314a7b2cc300312af861","releaseDate":"2022-11-10T17:13:46.826Z","createdAt":"2022-11-10T17:13:46.826Z","__v":1,"updatedAt":"2023-12-26T08:08:00.624Z"},"__v":1,"parentDoc":"646721ee069cce07a369a274","isApi":false,"tutorials":[],"id":"646644cbf8ef0d18bc8eda79"},"hideTOC":false,"meta":{"slug":"set-up-apache-virtual-hosts-on-the-ubuntu-operating-system","type":"docs","parent":"646721ee069cce07a369a274","image":[],"title":"Set up Apache virtual Hosts on the Ubuntu Operating System","title_seo":"Set up Apache virtual Hosts on the Ubuntu Operating System","description":"Now that Apache is installed and running, you can configure it to servemultiple domains by using virtual hosts.Create the layoutThis example uses two domains: domain1.com and domain2.com. In your home directory, create a public_html folder:cd ~mkdir public_html For each domain that you want to host,...","keywords":"","robots":"index","_id":"646644cbf8ef0d18bc8eda79","hidden":false},"slugUrl":"/docs/set-up-apache-virtual-hosts-on-the-ubuntu-operating-system","config":{"algoliaIndex":"readme_search_v2","amplitude":"dc8065a65ef83d6ad23e37aaf014fc84","asset_url":"https://cdn.readme.io","domain":"readme.io","domainFull":"https://dash.readme.com","encryptedLocalStorageKey":"ekfls","fullstory":{"enabled":true},"metrics":{"dashUrl":"https://m.readme.io","defaultUrl":"https://metrics.readme.io","exportMaxRetries":12,"wsUrl":"wss://m.readme.io"},"readmeRecaptchaSiteKey":"6LesVBYpAAAAAESOCHOyo2kF9SZXPVb54Nwf3i2x","releaseVersion":"4.567.0","sentry":{"dsn":"https://3bbe57a973254129bcb93e47dc0cc46f@o343074.ingest.sentry.io/2052166","enabled":true,"tracesSampleRate":0},"sslGenerationService":"ssl.readmessl.com"},"context":{"labs":{},"user":{},"terms":[{"_id":"636d314a7b2cc300312af862","term":"parliament","definition":"Owls are generally solitary, but when seen together the group is called a 'parliament'!"}],"variables":{"user":{},"defaults":[{"source":"security","_id":"641e10ffd239e90035bb5928","name":"api_key","type":"apiKey","apiSetting":"641e10fed239e90035bb5923"},{"source":"security","_id":"641e10ffd239e90035bb5927","name":"petstore_auth","type":"oauth2","apiSetting":"641e10fed239e90035bb5923"},null,{"source":"security","_id":"645a798c3273ad32563c4726","name":"noauthAuth","type":"http","scheme":"noauth","apiSetting":"645a798b3273ad32563c4724"}]},"project":{"_id":"636d314a7b2cc300312af861","appearance":{"rdmd":{"callouts":{"useIconFont":false},"theme":{"background":"","border":"","markdownEdge":"","markdownFont":"","markdownFontSize":"","markdownLineHeight":"","markdownRadius":"","markdownText":"","markdownTitle":"","markdownTitleFont":"","mdCodeBackground":"","mdCodeFont":"","mdCodeRadius":"","mdCodeTabs":"","mdCodeText":"","tableEdges":"","tableHead":"","tableHeadText":"","tableRow":"","tableStripe":"","tableText":"","text":"","title":""}},"main_body":{"type":"links"},"colors":{"highlight":"","main":"#000000","main_alt":"","header_text":"","body_highlight":"#367ED4","custom_login_link_color":""},"typography":{"headline":"Open+Sans:400:sans-serif","body":"Open+Sans:400:sans-serif","typekit":false,"tk_key":"","tk_headline":"","tk_body":""},"header":{"style":"custom","img":["https://files.readme.io/931b99b-banner.png","931b99b-banner.png",1253,218,"#000000",null,"647fedd793c708000af4eb4f"],"img_size":"cover","img_pos":"tl"},"body":{"style":"none"},"global_landing_page":{"html":"","redirect":""},"referenceSimpleMode":true,"referenceLayout":"row","link_logo_to_url":true,"theme":"solid","colorScheme":"light","overlay":"triangles","landing":true,"sticky":false,"hide_logo":true,"childrenAsPills":false,"subheaderStyle":"links","splitReferenceDocs":false,"showMetricsInReference":true,"logo":["https://files.readme.io/45785f4-brandmark-blue.svg","readme.svg",60,60,"#048ef5"],"loginLogo":[],"logo_white":["https://files.readme.io/b36afb9-small-Rackspace_Technology_Logo_RGB_WHT.png","Rackspace_Technology_Logo_RGB_WHT.png",259,80,"#ffffff","https://files.readme.io/c51eb39-Rackspace_Technology_Logo_RGB_WHT.png"],"logo_white_use":true,"logo_large":true,"favicon":["https://files.readme.io/03d0889-favicon.ico","favicon.ico",32,32,"#000000"],"stylesheet":"","stylesheet_hub2":"@media (max-width: 390px) {\n .Header-left-nav2xWPWMNHOGf_ {\n\t\tdisplay: none !important;\n }\n}\n\n@media (max-width: 768px) {\n .rm-SearchToggle {\n \twidth: unset !important;\n }\n}\n\nh2,\nh3,\nh4,\n.markdown-body h2,\n.markdown-body h3,\n.markdown-body h4 {\n\tcolor: #64005A !important;\n}\n\n/*----------------------------\nGlobal Header Changes\n-----------------------------*/\n.App header .rm-Container {\n max-width: inherit;\n}\n\n/*----------------------------\nCustom 404 Error Page Styles\n----------------------------*/\n\n.rm-LandingPageHeader h1 {\n color: white;\n}\n\nheader .rm-Container.rm-Container_flex {\n\tbackground-color: black;\n}\n\n.custom-page-not-found-message {\n\ttext-align: center;\n}\n\n.custom-page-not-found-message ul,\n.custom-page-not-found-message ul li {\n\ttext-align: initial;\n}\n\n.centered-list {\n\tpadding: 0 30%;\n}\n\n.rm-CustomPage h1 {\n\twidth: 100%;\n position: relative;\n text-align: center;\n}\n.rm-CustomPage h1::before {\n content: \"//www.marisma21.com/docs/docs/\";\n display: block;\n\tbackground-image: url(\"https://files.readme.io/6228383-No-Result-Found.png\");\n height: 100px;\n margin-bottom: 2rem;\n text-align: center;\n background-position: center;\n background-repeat: no-repeat;\n}\n\n\nfooter {\n background-color: #3B3F45;\n color: $color-white;\n font-size: 0.8rem;\n letter-spacing: 0.025em;\n position: relative;\n z-index: 1;\n text-align: left;\n}\n\nfooter .container {\n\tdisplay: flex;\n flex-wrap: wrap;\n}\n\nfooter .basement-container {\n\tflex: 0 100%;\n background-color: black;\n}\n\nfooter .markdown-body {\n\tmargin: 40px;\n}\n\nfooter .markdown-body h5 {\n color: white;\n font-size: 10px;\n}\nfooter ul {\n float: left;\n}\nfooter li {\n\tlist-style: none;\n}\nfooter li a {\n\ttext-decoration: none;\n}\n\n/* #hub-sidebar {display: none;} */","stylesheet_hub3":"","javascript":"","javascript_hub2":"","html_promo":"","html_body":"","html_footer":"
\n
\n
Developer Network
\n \n
\n \n \n\t\t
\n \t\t\n\t\t
\n
","html_head":"","html_footer_meta":"","html_hidelinks":false,"showVersion":false,"hideTableOfContents":false,"nextStepsLabel":"","promos":[{"extras":{"type":"buttons","buttonPrimary":"docs","buttonSecondary":"reference"},"title":"Rackspace Customer Support Documentation","text":"Rackspace support and API documentation for all our services.","_id":"636d314a7b2cc300312af863"}],"changelog":{"layoutExpanded":false,"showAuthor":true,"showExactDate":false},"allowApiExplorerJsonEditor":false},"custom_domain":"docs.rackspace.com","childrenProjects":[],"description":"API and Support documentation for Rackspace Technology products and services.","error404":"page-not-found","experiments":[],"first_page":"landing","flags":{"allowApiExplorerJsonEditor":false,"allowDarkMode":false,"alwaysShowDocPublishStatus":false,"allowXFrame":false,"correctnewlines":false,"dashReact":false,"disablePasswordlessLogin":false,"directGoogleToStableVersion":false,"disableAnonForum":false,"enterprise":false,"graphql":false,"migrationRun":false,"migrationSwaggerRun":false,"myDevelopers":false,"newEditor":true,"newEditorDash":true,"newMarkdownBetaProgram":true,"newSearch":true,"oauth":false,"oldMarkdown":false,"rdmdCompatibilityMode":false,"reviewWorkflow":true,"singleProjectEnterprise":false,"speedyRender":false,"staging":false,"star":false,"swagger":false,"translation":false,"useReactApp":true,"useReactGLP":false,"superHub":false,"developerDashboard":false,"allowReusableOTPs":false,"dashHomeRefresh":false,"owlbotAi":false,"apiV2":false,"git":{"read":false,"write":false},"superHubBeta":false,"dashQuickstart":false,"disableAutoTranslate":false,"customBlocks":false,"devDashHub":false,"disableSAMLScoping":false,"allowUnsafeCustomHtmlSuggestionsFromNonAdmins":false,"apiAccessRevoked":false},"fullBaseUrl":"https://docs.rackspace.com/","glossaryTerms":[{"_id":"636d314a7b2cc300312af862","term":"parliament","definition":"Owls are generally solitary, but when seen together the group is called a 'parliament'!"}],"graphqlSchema":"","gracePeriod":{"enabled":false,"endsAt":null},"hasOneChild":false,"healthCheck":{"provider":"","settings":{}},"intercom_secure_emailonly":false,"intercom":"","is_active":true,"internal":"","landing_bottom":[{"type":"docs","alignment":"left","pageType":"Documentation"},{"type":"docs","alignment":"left","pageType":"Reference"}],"metrics":{"realtime":{"dashEnabled":false},"monthlyLimit":0,"planLimit":1000000,"thumbsEnabled":true},"modules":{"landing":true,"docs":true,"examples":true,"reference":true,"graphql":false,"changelog":false,"discuss":false,"suggested_edits":true,"logs":false,"custompages":true,"tutorials":false},"name":"Rackspace Technology Documentation","nav_names":{"docs":"Documentation","reference":"","changelog":"Technical Blogs","discuss":"","tutorials":"","recipes":""},"oauth_url":"","onboardingCompleted":{"documentation":true,"appearance":true,"jwt":true,"api":true,"logs":true,"domain":true,"metricsSDK":false},"owlbot":{"enabled":false,"isPaying":false,"customization":{"answerLength":"long","customTone":"","defaultAnswer":"","forbiddenWords":"","tone":"neutral"}},"owner":"62ebe6e6767589001ace3a5e","plan":"business2018","planOverride":"","planTrial":"business2018","readmeScore":{"components":{"newDesign":{"enabled":true,"points":25},"reference":{"enabled":true,"points":50},"tryItNow":{"enabled":true,"points":35},"syncingOAS":{"enabled":true,"points":10},"customLogin":{"enabled":false,"points":25},"metrics":{"enabled":false,"points":40},"recipes":{"enabled":false,"points":15},"pageVoting":{"enabled":true,"points":1},"suggestedEdits":{"enabled":true,"points":10},"support":{"enabled":false,"points":5},"htmlLanding":{"enabled":false,"points":5},"guides":{"enabled":true,"points":10},"changelog":{"enabled":false,"points":5},"glossary":{"enabled":false,"points":1},"variables":{"enabled":true,"points":1},"integrations":{"enabled":false,"points":2}},"totalScore":142},"reCaptchaSiteKey":"","reference":{"alwaysUseDefaults":true,"defaultExpandResponseExample":false},"stable":{"_id":"636d314a7b2cc300312af866","version":"1.0","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":true,"is_hidden":false,"is_deprecated":false,"categories":["636d314a7b2cc300312af868","636d314a7b2cc300312af868","6372011ade7b7600a2343971","63726bb1975454004c244cf0","6376be12127d9900031599e1","63774b1d9eef4a00e5b62f18","63ff1e02b3738700445b26b4","63ff83dd43c817007346d470","64107a6ff9a9400061fb465a","64107a750b81930011506490","64107a79fc13c0005ed4836d","64107a7c9cf8520011a62bd9","64107a7fee1584001f61f947","641082b90f3ef4000b43ef26","641e010c3515610d761cf71d","641e0fe685ebf8003c2ac2e9","641e1030fe15970059b83d7a","641e10fed239e90035bb5924","643976eb94d370000deca9c5","643eb4d1f195600074707bde","643edb1078e8af00581d6025","6446e6cd4c6c320012421eba","64471a0483c65f003cc90679","6447fa1204508d167ad74187","644acc292835070056a1ffc2","64512c3398180c0032bcebc2","64516fe83f49d100296cd1bd","645171e4f1fb03006c7ee494","6451751e0ac9da001158d36a","64518259f068f50477d88696","64528ac2439fe20018a1136d","64529bbd1df7160064bb4130","6452a2c25889bb0c1e2603c2","6452a5b8154b870116b0541c","6452a5d3173e670068a40e04","6452a5f3254968001a6a8591","6452a6785abf210bdfe90146","6452b20b90709a0e007dcd10","6452b55b5a587200583ffd21","6452d52eeccf7c03cc275a95","645374b2c2a2640527e72fa2","6453b5166cb45618d546ca72","645477a8f90ece004ad0f609","6454aee1a6984a002f419059","6454af754df037000a477f38","64550c22aed895000b35e4e5","64551057a6984a002f47639f","645531b975d48b11b616e04c","645539b8f98098150309e05b","645544ce03e4210923c460e0","645546ff818fde20d9540305","645547eb6c0fef1e25749bfd","645549398c26ca0825a54daa","6455499c590d5d004bed6ea4","64554a2643d50200424c949f","64554a49f549ec00603ffca9","64554a62e79d4d158bb7c7e6","6455542d375c23005fe8b0e6","64555468d1f36d1496d6cdc8","64555815aa3ef3004371a359","6455593a98a9f21f277c445e","645560f1397690015ef4605f","6455702c1fbcf7000aa29af8","6458746a53771c01d5540ea1","64587a7f5cc705003d964d2c","645882b110a29802bb76f633","6458a6b24e80bc00745061e5","6458c4a6b80425005fe1eab2","6458c7173e18d001d7e62202","6458d57d5aa615002563ce8b","6458d6aae642620012783f2b","64598b4afed949000a631205","6459f83ed3e7e41076e6f7ac","645a3186b28e5e1e83d7eb1a","645a69297458df011aa5e228","645a6e07e142ac003c199287","645a6ea1872f3e322bf9a1d3","645a798b3273ad32563c4725","645af6e9f35aa90ad1fd945f","645b585b6e8a3009c63793dd","645b9f6da30de608fe6a9a18","645ba1b6d34aea1c2d16b0e9","645cf4ad9fa1110a67ad1e44","6466c9be6219af0a2dce7bf6","6466df1311b66b09ca7824eb","646b7817157f4b0074ef0969","6476362675a20e0044c3806f","64763e486eb59e0074e36589","6476402c373b6d00239d7529","647641c860cf5f004b98257b","647670afde4a1500494a9afa","6476d61c7fb8dd000a4ba53e","6476df870c36a3004e86c355","64810347dea925001e9966a5","648173085c2c33002f3852ba","648174fe92e2fc0baa3e8257","648b1684be1002180b500145","6491634b44859c00253786f9","649d7050b8a47e003cc16e70","64e3258b6436f0002c5898d5","64e71501135f560041d1fe15","651592d5e816a81977972e97","6554f620ea420b004e5e098b","657b1ac6ee3b67003015b961","658a89e0d696ad001c089aa2"],"project":"636d314a7b2cc300312af861","releaseDate":"2022-11-10T17:13:46.826Z","createdAt":"2022-11-10T17:13:46.826Z","__v":1,"updatedAt":"2023-12-26T08:08:00.624Z"},"subdomain":"rackspace-test-1","subpath":"","topnav":{"left":[],"right":[{"type":"url","text":"System Status","url":"//www.marisma21.com/status/"},{"type":"url","text":"Portal Login","url":"//www.marisma21.com/docs/login"}],"bottom":[],"edited":true},"trial":{"trialDeadlineEnabled":true,"trialEndsAt":"2023-05-01T17:13:46.463Z"},"translate":{"provider":"transifex","show_widget":false,"key_public":"","key_secret":"","org_name":"","project_name":"","languages":[]},"url":"//www.marisma21.com/docs/","versions":[{"_id":"636d314a7b2cc300312af866","version":"1.0","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":true,"is_hidden":false,"is_deprecated":false,"categories":["636d314a7b2cc300312af868","636d314a7b2cc300312af868","6372011ade7b7600a2343971","63726bb1975454004c244cf0","6376be12127d9900031599e1","63774b1d9eef4a00e5b62f18","63ff1e02b3738700445b26b4","63ff83dd43c817007346d470","64107a6ff9a9400061fb465a","64107a750b81930011506490","64107a79fc13c0005ed4836d","64107a7c9cf8520011a62bd9","64107a7fee1584001f61f947","641082b90f3ef4000b43ef26","641e010c3515610d761cf71d","641e0fe685ebf8003c2ac2e9","641e1030fe15970059b83d7a","641e10fed239e90035bb5924","643976eb94d370000deca9c5","643eb4d1f195600074707bde","643edb1078e8af00581d6025","6446e6cd4c6c320012421eba","64471a0483c65f003cc90679","6447fa1204508d167ad74187","644acc292835070056a1ffc2","64512c3398180c0032bcebc2","64516fe83f49d100296cd1bd","645171e4f1fb03006c7ee494","6451751e0ac9da001158d36a","64518259f068f50477d88696","64528ac2439fe20018a1136d","64529bbd1df7160064bb4130","6452a2c25889bb0c1e2603c2","6452a5b8154b870116b0541c","6452a5d3173e670068a40e04","6452a5f3254968001a6a8591","6452a6785abf210bdfe90146","6452b20b90709a0e007dcd10","6452b55b5a587200583ffd21","6452d52eeccf7c03cc275a95","645374b2c2a2640527e72fa2","6453b5166cb45618d546ca72","645477a8f90ece004ad0f609","6454aee1a6984a002f419059","6454af754df037000a477f38","64550c22aed895000b35e4e5","64551057a6984a002f47639f","645531b975d48b11b616e04c","645539b8f98098150309e05b","645544ce03e4210923c460e0","645546ff818fde20d9540305","645547eb6c0fef1e25749bfd","645549398c26ca0825a54daa","6455499c590d5d004bed6ea4","64554a2643d50200424c949f","64554a49f549ec00603ffca9","64554a62e79d4d158bb7c7e6","6455542d375c23005fe8b0e6","64555468d1f36d1496d6cdc8","64555815aa3ef3004371a359","6455593a98a9f21f277c445e","645560f1397690015ef4605f","6455702c1fbcf7000aa29af8","6458746a53771c01d5540ea1","64587a7f5cc705003d964d2c","645882b110a29802bb76f633","6458a6b24e80bc00745061e5","6458c4a6b80425005fe1eab2","6458c7173e18d001d7e62202","6458d57d5aa615002563ce8b","6458d6aae642620012783f2b","64598b4afed949000a631205","6459f83ed3e7e41076e6f7ac","645a3186b28e5e1e83d7eb1a","645a69297458df011aa5e228","645a6e07e142ac003c199287","645a6ea1872f3e322bf9a1d3","645a798b3273ad32563c4725","645af6e9f35aa90ad1fd945f","645b585b6e8a3009c63793dd","645b9f6da30de608fe6a9a18","645ba1b6d34aea1c2d16b0e9","645cf4ad9fa1110a67ad1e44","6466c9be6219af0a2dce7bf6","6466df1311b66b09ca7824eb","646b7817157f4b0074ef0969","6476362675a20e0044c3806f","64763e486eb59e0074e36589","6476402c373b6d00239d7529","647641c860cf5f004b98257b","647670afde4a1500494a9afa","6476d61c7fb8dd000a4ba53e","6476df870c36a3004e86c355","64810347dea925001e9966a5","648173085c2c33002f3852ba","648174fe92e2fc0baa3e8257","648b1684be1002180b500145","6491634b44859c00253786f9","649d7050b8a47e003cc16e70","64e3258b6436f0002c5898d5","64e71501135f560041d1fe15","651592d5e816a81977972e97","6554f620ea420b004e5e098b","657b1ac6ee3b67003015b961","658a89e0d696ad001c089aa2"],"project":"636d314a7b2cc300312af861","releaseDate":"2022-11-10T17:13:46.826Z","createdAt":"2022-11-10T17:13:46.826Z","__v":1,"updatedAt":"2023-12-26T08:08:00.624Z"}],"variableDefaults":[{"source":"security","_id":"641e10ffd239e90035bb5928","name":"api_key","type":"apiKey","apiSetting":"641e10fed239e90035bb5923"},{"source":"security","_id":"641e10ffd239e90035bb5927","name":"petstore_auth","type":"oauth2","apiSetting":"641e10fed239e90035bb5923"},null,{"source":"security","_id":"645a798c3273ad32563c4726","name":"noauthAuth","type":"http","scheme":"noauth","apiSetting":"645a798b3273ad32563c4724"}],"webhookEnabled":false,"isHubEditable":true},"projectStore":{"data":{"allow_crawlers":"disabled","canonical_url":null,"description":"API and Support documentation for Rackspace Technology products and services.","homepage_url":"//www.marisma21.com/docs/","name":"Rackspace Technology Documentation","redirects":[],"sitemap":"disabled","subdomain":"rackspace-test-1","suggested_edits":"enabled","uri":"/projects/me","custom_login":{"login_url":null,"logout_url":null},"pages":{"not_found":"/custom_pages/page-not-found"},"privacy":{"view":"public","password":null},"reference":{"defaults":"always_use","response_examples":"collapsed"},"plan":{"type":"business2018","grace_period":{"enabled":false,"end_date":null},"trial":{"expired":false,"end_date":"2023-05-01T17:13:46.463Z"}},"health_check":{"provider":"none","settings":{"manual":{"status":"down","url":null},"statuspage":{"id":null}}},"integrations":{"bing":{"verify":null},"google":{"analytics":null,"site_verification":null},"heap":{"id":null},"koala":{"key":null},"localize":{"key":null},"recaptcha":{"site_key":null,"secret_key":null},"segment":{"key":null,"domain":null},"typekit":{"key":null},"zendesk":{"subdomain":null},"intercom":{"app_id":null,"secure_mode":{"key":null,"email_only":false}}},"permissions":{"appearance":{"private_label":"enabled","custom_code":{"css":"enabled","html":"enabled","js":"disabled"}}},"appearance":{"table_of_contents":"enabled","whats_next_label":null,"brand":{"primary_color":"#000000","link_color":"#367ED4","theme":"light"},"changelog":{"layout":"collapsed","show_author":true,"show_exact_date":false},"explorer":{"json_editor":"disabled"},"footer":{"readme_logo":"hide"},"custom_code":{"css":"@media (max-width: 390px) {\n .Header-left-nav2xWPWMNHOGf_ {\n\t\tdisplay: none !important;\n }\n}\n\n@media (max-width: 768px) {\n .rm-SearchToggle {\n \twidth: unset !important;\n }\n}\n\nh2,\nh3,\nh4,\n.markdown-body h2,\n.markdown-body h3,\n.markdown-body h4 {\n\tcolor: #64005A !important;\n}\n\n/*----------------------------\nGlobal Header Changes\n-----------------------------*/\n.App header .rm-Container {\n max-width: inherit;\n}\n\n/*----------------------------\nCustom 404 Error Page Styles\n----------------------------*/\n\n.rm-LandingPageHeader h1 {\n color: white;\n}\n\nheader .rm-Container.rm-Container_flex {\n\tbackground-color: black;\n}\n\n.custom-page-not-found-message {\n\ttext-align: center;\n}\n\n.custom-page-not-found-message ul,\n.custom-page-not-found-message ul li {\n\ttext-align: initial;\n}\n\n.centered-list {\n\tpadding: 0 30%;\n}\n\n.rm-CustomPage h1 {\n\twidth: 100%;\n position: relative;\n text-align: center;\n}\n.rm-CustomPage h1::before {\n content: \"//www.marisma21.com/docs/docs/\";\n display: block;\n\tbackground-image: url(\"https://files.readme.io/6228383-No-Result-Found.png\");\n height: 100px;\n margin-bottom: 2rem;\n text-align: center;\n background-position: center;\n background-repeat: no-repeat;\n}\n\n\nfooter {\n background-color: #3B3F45;\n color: $color-white;\n font-size: 0.8rem;\n letter-spacing: 0.025em;\n position: relative;\n z-index: 1;\n text-align: left;\n}\n\nfooter .container {\n\tdisplay: flex;\n flex-wrap: wrap;\n}\n\nfooter .basement-container {\n\tflex: 0 100%;\n background-color: black;\n}\n\nfooter .markdown-body {\n\tmargin: 40px;\n}\n\nfooter .markdown-body h5 {\n color: white;\n font-size: 10px;\n}\nfooter ul {\n float: left;\n}\nfooter li {\n\tlist-style: none;\n}\nfooter li a {\n\ttext-decoration: none;\n}\n\n/* #hub-sidebar {display: none;} */","js":null,"html":{"header":null,"home_footer":"
\n
\n
Developer Network
\n \n
\n \n \n\t\t
\n \t\t\n\t\t
\n
","page_footer":null}},"markdown":{"callouts":{"icon_font":"emojis"}},"logo":{"size":"large","dark_mode":{"uri":null,"url":"https://files.readme.io/b36afb9-small-Rackspace_Technology_Logo_RGB_WHT.png","name":"Rackspace_Technology_Logo_RGB_WHT.png","width":259,"height":80,"color":"#ffffff","links":{"original_url":"https://files.readme.io/c51eb39-Rackspace_Technology_Logo_RGB_WHT.png"}},"main":{"uri":null,"url":"https://files.readme.io/45785f4-brandmark-blue.svg","name":"readme.svg","width":60,"height":60,"color":"#048ef5","links":{"original_url":null}},"favicon":{"uri":null,"url":"https://files.readme.io/03d0889-favicon.ico","name":"favicon.ico","width":32,"height":32,"color":"#000000","links":{"original_url":null}}},"navigation":{"first_page":"landing_page","left":[],"logo_link":"homepage","right":[{"type":"link_url","title":"System Status","url":"//www.marisma21.com/status/","custom_page":null},{"type":"link_url","title":"Portal Login","url":"//www.marisma21.com/docs/login","custom_page":null}],"sub_nav":[],"subheader_layout":"links","version":"disabled","links":{"home":{"label":"Home","visibility":"enabled"},"graphql":{"label":"GraphQL","visibility":"disabled"},"guides":{"label":"Guides","alias":"Documentation","visibility":"enabled"},"reference":{"label":"API Reference","alias":null,"visibility":"enabled"},"recipes":{"label":"Recipes","alias":null,"visibility":"disabled"},"changelog":{"label":"Changelog","alias":"Technical Blogs","visibility":"disabled"},"discussions":{"label":"Discussions","alias":null,"visibility":"disabled"}}},"header":{"type":"overlay","gradient_color":null,"overlay":{"fill":"cover","type":"custom","position":"top-left","image":{"uri":"/images/647fedd793c708000af4eb4f","url":"https://files.readme.io/931b99b-banner.png","name":"931b99b-banner.png","width":1253,"height":218,"color":"#000000","links":{"original_url":null}}}}}}},"version":{"_id":"636d314a7b2cc300312af866","version":"1.0","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":true,"is_hidden":false,"is_deprecated":false,"categories":["636d314a7b2cc300312af868","636d314a7b2cc300312af868","6372011ade7b7600a2343971","63726bb1975454004c244cf0","6376be12127d9900031599e1","63774b1d9eef4a00e5b62f18","63ff1e02b3738700445b26b4","63ff83dd43c817007346d470","64107a6ff9a9400061fb465a","64107a750b81930011506490","64107a79fc13c0005ed4836d","64107a7c9cf8520011a62bd9","64107a7fee1584001f61f947","641082b90f3ef4000b43ef26","641e010c3515610d761cf71d","641e0fe685ebf8003c2ac2e9","641e1030fe15970059b83d7a","641e10fed239e90035bb5924","643976eb94d370000deca9c5","643eb4d1f195600074707bde","643edb1078e8af00581d6025","6446e6cd4c6c320012421eba","64471a0483c65f003cc90679","6447fa1204508d167ad74187","644acc292835070056a1ffc2","64512c3398180c0032bcebc2","64516fe83f49d100296cd1bd","645171e4f1fb03006c7ee494","6451751e0ac9da001158d36a","64518259f068f50477d88696","64528ac2439fe20018a1136d","64529bbd1df7160064bb4130","6452a2c25889bb0c1e2603c2","6452a5b8154b870116b0541c","6452a5d3173e670068a40e04","6452a5f3254968001a6a8591","6452a6785abf210bdfe90146","6452b20b90709a0e007dcd10","6452b55b5a587200583ffd21","6452d52eeccf7c03cc275a95","645374b2c2a2640527e72fa2","6453b5166cb45618d546ca72","645477a8f90ece004ad0f609","6454aee1a6984a002f419059","6454af754df037000a477f38","64550c22aed895000b35e4e5","64551057a6984a002f47639f","645531b975d48b11b616e04c","645539b8f98098150309e05b","645544ce03e4210923c460e0","645546ff818fde20d9540305","645547eb6c0fef1e25749bfd","645549398c26ca0825a54daa","6455499c590d5d004bed6ea4","64554a2643d50200424c949f","64554a49f549ec00603ffca9","64554a62e79d4d158bb7c7e6","6455542d375c23005fe8b0e6","64555468d1f36d1496d6cdc8","64555815aa3ef3004371a359","6455593a98a9f21f277c445e","645560f1397690015ef4605f","6455702c1fbcf7000aa29af8","6458746a53771c01d5540ea1","64587a7f5cc705003d964d2c","645882b110a29802bb76f633","6458a6b24e80bc00745061e5","6458c4a6b80425005fe1eab2","6458c7173e18d001d7e62202","6458d57d5aa615002563ce8b","6458d6aae642620012783f2b","64598b4afed949000a631205","6459f83ed3e7e41076e6f7ac","645a3186b28e5e1e83d7eb1a","645a69297458df011aa5e228","645a6e07e142ac003c199287","645a6ea1872f3e322bf9a1d3","645a798b3273ad32563c4725","645af6e9f35aa90ad1fd945f","645b585b6e8a3009c63793dd","645b9f6da30de608fe6a9a18","645ba1b6d34aea1c2d16b0e9","645cf4ad9fa1110a67ad1e44","6466c9be6219af0a2dce7bf6","6466df1311b66b09ca7824eb","646b7817157f4b0074ef0969","6476362675a20e0044c3806f","64763e486eb59e0074e36589","6476402c373b6d00239d7529","647641c860cf5f004b98257b","647670afde4a1500494a9afa","6476d61c7fb8dd000a4ba53e","6476df870c36a3004e86c355","64810347dea925001e9966a5","648173085c2c33002f3852ba","648174fe92e2fc0baa3e8257","648b1684be1002180b500145","6491634b44859c00253786f9","649d7050b8a47e003cc16e70","64e3258b6436f0002c5898d5","64e71501135f560041d1fe15","651592d5e816a81977972e97","6554f620ea420b004e5e098b","657b1ac6ee3b67003015b961","658a89e0d696ad001c089aa2"],"project":"636d314a7b2cc300312af861","releaseDate":"2022-11-10T17:13:46.826Z","createdAt":"2022-11-10T17:13:46.826Z","__v":1,"updatedAt":"2023-12-26T08:08:00.624Z"}},"reqUrl":"/docs/set-up-apache-virtual-hosts-on-the-ubuntu-operating-system","version":{"_id":"636d314a7b2cc300312af866","version":"1.0","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":true,"is_hidden":false,"is_deprecated":false,"categories":["636d314a7b2cc300312af868","636d314a7b2cc300312af868","6372011ade7b7600a2343971","63726bb1975454004c244cf0","6376be12127d9900031599e1","63774b1d9eef4a00e5b62f18","63ff1e02b3738700445b26b4","63ff83dd43c817007346d470","64107a6ff9a9400061fb465a","64107a750b81930011506490","64107a79fc13c0005ed4836d","64107a7c9cf8520011a62bd9","64107a7fee1584001f61f947","641082b90f3ef4000b43ef26","641e010c3515610d761cf71d","641e0fe685ebf8003c2ac2e9","641e1030fe15970059b83d7a","641e10fed239e90035bb5924","643976eb94d370000deca9c5","643eb4d1f195600074707bde","643edb1078e8af00581d6025","6446e6cd4c6c320012421eba","64471a0483c65f003cc90679","6447fa1204508d167ad74187","644acc292835070056a1ffc2","64512c3398180c0032bcebc2","64516fe83f49d100296cd1bd","645171e4f1fb03006c7ee494","6451751e0ac9da001158d36a","64518259f068f50477d88696","64528ac2439fe20018a1136d","64529bbd1df7160064bb4130","6452a2c25889bb0c1e2603c2","6452a5b8154b870116b0541c","6452a5d3173e670068a40e04","6452a5f3254968001a6a8591","6452a6785abf210bdfe90146","6452b20b90709a0e007dcd10","6452b55b5a587200583ffd21","6452d52eeccf7c03cc275a95","645374b2c2a2640527e72fa2","6453b5166cb45618d546ca72","645477a8f90ece004ad0f609","6454aee1a6984a002f419059","6454af754df037000a477f38","64550c22aed895000b35e4e5","64551057a6984a002f47639f","645531b975d48b11b616e04c","645539b8f98098150309e05b","645544ce03e4210923c460e0","645546ff818fde20d9540305","645547eb6c0fef1e25749bfd","645549398c26ca0825a54daa","6455499c590d5d004bed6ea4","64554a2643d50200424c949f","64554a49f549ec00603ffca9","64554a62e79d4d158bb7c7e6","6455542d375c23005fe8b0e6","64555468d1f36d1496d6cdc8","64555815aa3ef3004371a359","6455593a98a9f21f277c445e","645560f1397690015ef4605f","6455702c1fbcf7000aa29af8","6458746a53771c01d5540ea1","64587a7f5cc705003d964d2c","645882b110a29802bb76f633","6458a6b24e80bc00745061e5","6458c4a6b80425005fe1eab2","6458c7173e18d001d7e62202","6458d57d5aa615002563ce8b","6458d6aae642620012783f2b","64598b4afed949000a631205","6459f83ed3e7e41076e6f7ac","645a3186b28e5e1e83d7eb1a","645a69297458df011aa5e228","645a6e07e142ac003c199287","645a6ea1872f3e322bf9a1d3","645a798b3273ad32563c4725","645af6e9f35aa90ad1fd945f","645b585b6e8a3009c63793dd","645b9f6da30de608fe6a9a18","645ba1b6d34aea1c2d16b0e9","645cf4ad9fa1110a67ad1e44","6466c9be6219af0a2dce7bf6","6466df1311b66b09ca7824eb","646b7817157f4b0074ef0969","6476362675a20e0044c3806f","64763e486eb59e0074e36589","6476402c373b6d00239d7529","647641c860cf5f004b98257b","647670afde4a1500494a9afa","6476d61c7fb8dd000a4ba53e","6476df870c36a3004e86c355","64810347dea925001e9966a5","648173085c2c33002f3852ba","648174fe92e2fc0baa3e8257","648b1684be1002180b500145","6491634b44859c00253786f9","649d7050b8a47e003cc16e70","64e3258b6436f0002c5898d5","64e71501135f560041d1fe15","651592d5e816a81977972e97","6554f620ea420b004e5e098b","657b1ac6ee3b67003015b961","658a89e0d696ad001c089aa2"],"project":"636d314a7b2cc300312af861","releaseDate":"2022-11-10T17:13:46.826Z","createdAt":"2022-11-10T17:13:46.826Z","__v":1,"updatedAt":"2023-12-26T08:08:00.624Z"},"lang":"en","langFull":"Default","isDetachedProductionSite":false,"rdmdOpts":{"normalize":true,"correctnewlines":false,"compatibilityMode":false}}">
Baidu
map