markdown 设置虚拟主机(apache)ubuntu 18.04,19.04

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown 设置虚拟主机(apache)ubuntu 18.04,19.04相关的知识,希望对你有一定的参考价值。

# Setup

/etc/apache2/sites-available - before creat file conf site.

/etc/apache2/sites-enabled - become сopy created file here (exists special command `sudo a2ensite {NAME_CONFIG_FILE}`).

## First

```
sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/{NAME_SITE}.conf

example:
sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/site1.local.conf
```
the approximate contents of the file:
```
<VirtualHost *:80>
ServerName site1.local !{NAME_SITE, at creation DEL}
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/site1.local/ !{PATH_SITE_FOLDER, at creation DEL}
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
```

## Second

```
sudo a2ensite site1.local
```
This command move created file in folder /etc/apache2/sites-enabled. The file name is written without '.conf'

## Last

Reload apach

```
sudo systemctr restart apache2
```

Check in browers. Written site1.local/

以上是关于markdown 设置虚拟主机(apache)ubuntu 18.04,19.04的主要内容,如果未能解决你的问题,请参考以下文章

markdown Apache Tomcat内存设置

星网锐捷5800ub怎样连接无线路由

markdown Apache [127.0.1.1。设置'ServerName']

Apache 'logrotate' 本地提取漏洞分析(CVE-2019-0211)

apache_conf 使用hexo-theme-freemind的推荐Markdown设置。

markdown 购买域名并需要设置主机