Skip to content

Commit

Permalink
Fix ganlvtech#7: Apache web server deployment instruction
Browse files Browse the repository at this point in the history
  • Loading branch information
ganlvtech committed Mar 23, 2019
1 parent fb428cc commit 3bc6855
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion docs/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

其余两种都不需要 ngx-fancyindex,这两种的区别在于使用了 Vue Router 的两种模式,`history` 或者 `hash`

第 2 种:使用 history 模式,URL 是 `https://down.52pojie.cn/Tools/Debuggers/`,这种需要对 Nginx 进行一些配置。
第 2 种:使用 history 模式,URL 是 `https://down.52pojie.cn/Tools/Debuggers/`,这种需要对 Nginx 或 Apache 进行一些配置。

第 3 种:使用 hash 模式,URL 是 `https://down.52pojie.cn/#/Tools/Debuggers/`,这种直接上传到服务器上即可,无需过多配置。

Expand Down Expand Up @@ -101,6 +101,34 @@ server {
}
```

### Apache 配置

打开 Rewrite 模块

```bash
sudo a2enmod rewrite
```

新建 `/etc/apache2/sites-enabled/down.test.conf`

```apache
<VirtualHost *:80>
ServerName down.test
DocumentRoot /srv/www/down
<Directory "/srv/www/down">
Options FollowSymlinks
AllowOverride None
Require all granted
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /index.html [L]
</Directory>
</VirtualHost>
```

### 插件配置

```javascript
Expand Down

0 comments on commit 3bc6855

Please sign in to comment.