Pre Merge pull request !143 from 曹真珲/develop

pull/143/MERGE
曹真珲 2022-04-22 09:31:16 +00:00 committed by Gitee
commit 091c09fe7c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 22 additions and 2 deletions

View File

@ -164,7 +164,7 @@ Listen 8001
sudo vi /etc/apache2/sites-available/000-default.conf
```
Add a new 'VirtualHost' as below
```xml
```
<VirtualHost 127.0.0.1:8001>
ServerAdmin MyEMS-admin
DocumentRoot /var/www/myems-admin
@ -173,9 +173,19 @@ Add a new 'VirtualHost' as below
Options FollowSymLinks
AllowOverride All
Require all granted
Header set Access-Control-Allow-Origin *
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Order Deny,Allow
Allow from all
</Proxy>
ProxyPass /api http://127.0.0.1:8000/
ProxyPassReverse /api http://127.0.0.1:8000/
</VirtualHost>
```

View File

@ -230,9 +230,19 @@ Add a new 'VirtualHost' as below
Options FollowSymLinks
AllowOverride All
Require all granted
Header set Access-Control-Allow-Origin *
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Order Deny,Allow
Allow from all
</Proxy>
ProxyPass /api http://127.0.0.1:8000/
ProxyPassReverse /api http://127.0.0.1:8000/
</VirtualHost>
```
@ -266,7 +276,7 @@ sudo vi .htaccess
```
Add a IfModule as below:
```bash
IfModule mod_rewrite.c>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]