Merge branch 'master' into develop

pull/142/MERGE
13621160019@163.com 2022-04-22 17:56:20 +08:00
commit 513f283fa2
3 changed files with 26 additions and 5 deletions

View File

@ -5,13 +5,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [Unreleased]
### Added
- None.
- added API reverse proxy in Apache conf.
### Changed
- None.
- replaced true with 1 in SQL statements of myems-api.
- updated user insert sql statement for failed_login_count.
### Fixed
- None.
- fixed typo in virtualmetercarbon.
### Removed
- None.

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]