updated myems-web installation
This commit is contained in:
parent
c09fc80d11
commit
254e50665f
|
@ -386,30 +386,18 @@ In this step, you will install myems-web UI service.
|
|||
refer to http://nginx.org/en/linux_packages.html#RHEL
|
||||
|
||||
* Configure NGINX
|
||||
```bash
|
||||
sudo nano /etc/nginx/nginx.conf
|
||||
```
|
||||
In the 'http' section, add some directives:
|
||||
```
|
||||
http {
|
||||
client_header_timeout 600;
|
||||
client_max_body_size 512M;
|
||||
gzip on;
|
||||
gzip_min_length 512;
|
||||
gzip_proxied any;
|
||||
gzip_types *;
|
||||
gzip_vary on;
|
||||
proxy_buffering off;
|
||||
...
|
||||
|
||||
}
|
||||
Remove default files
|
||||
```bash
|
||||
sudo rm /etc/nginx/sites-enabled/default
|
||||
sudo rm /etc/nginx/conf.d/default.conf
|
||||
```
|
||||
|
||||
Update the nginx default conf file:
|
||||
Add a new file under /etc/nginx/conf.d/
|
||||
```bash
|
||||
sudo nano /etc/nginx/conf.d/default.conf
|
||||
sudo nano /etc/nginx/conf.d/myems-web.conf
|
||||
```
|
||||
Write with directives as below, and replace the default myems-api url http://127.0.0.1:8000/ with actual url if the myems-api servcie hosted on different server
|
||||
Add a new 'server' section with directives as below:
|
||||
```
|
||||
server {
|
||||
listen 80;
|
||||
|
|
|
@ -361,30 +361,18 @@ In this step, you will install myems-web UI service.
|
|||
refer to http://nginx.org/en/linux_packages.html#RHEL
|
||||
|
||||
* Configure NGINX
|
||||
```bash
|
||||
sudo nano /etc/nginx/nginx.conf
|
||||
```
|
||||
In the 'http' section, add some directives:
|
||||
```
|
||||
http {
|
||||
client_header_timeout 600;
|
||||
client_max_body_size 512M;
|
||||
gzip on;
|
||||
gzip_min_length 512;
|
||||
gzip_proxied any;
|
||||
gzip_types *;
|
||||
gzip_vary on;
|
||||
proxy_buffering off;
|
||||
...
|
||||
|
||||
}
|
||||
Remove default files
|
||||
```bash
|
||||
sudo rm /etc/nginx/sites-enabled/default
|
||||
sudo rm /etc/nginx/conf.d/default.conf
|
||||
```
|
||||
|
||||
Update the nginx default conf file:
|
||||
Add a new file under /etc/nginx/conf.d/
|
||||
```bash
|
||||
sudo nano /etc/nginx/conf.d/default.conf
|
||||
sudo nano /etc/nginx/conf.d/myems-web.conf
|
||||
```
|
||||
Write with directives as below, and replace the default myems-api url http://127.0.0.1:8000/ with actual url if the myems-api servcie hosted on different server
|
||||
Add a new 'server' section with directives as below:
|
||||
```
|
||||
server {
|
||||
listen 80;
|
||||
|
|
|
@ -383,30 +383,18 @@ In this step, you will install myems-web UI service.
|
|||
refer to http://nginx.org/en/linux_packages.html#RHEL
|
||||
|
||||
* Configure NGINX
|
||||
```bash
|
||||
sudo nano /etc/nginx/nginx.conf
|
||||
```
|
||||
In the 'http' section, add some directives:
|
||||
```
|
||||
http {
|
||||
client_header_timeout 600;
|
||||
client_max_body_size 512M;
|
||||
gzip on;
|
||||
gzip_min_length 512;
|
||||
gzip_proxied any;
|
||||
gzip_types *;
|
||||
gzip_vary on;
|
||||
proxy_buffering off;
|
||||
...
|
||||
|
||||
}
|
||||
Remove default files
|
||||
```bash
|
||||
sudo rm /etc/nginx/sites-enabled/default
|
||||
sudo rm /etc/nginx/conf.d/default.conf
|
||||
```
|
||||
|
||||
Update the nginx default conf file:
|
||||
Add a new file under /etc/nginx/conf.d/
|
||||
```bash
|
||||
sudo nano /etc/nginx/conf.d/default.conf
|
||||
sudo nano /etc/nginx/conf.d/myems-web.conf
|
||||
```
|
||||
Write with directives as below, and replace the default myems-api url http://127.0.0.1:8000/ with actual url if the myems-api servcie hosted on different server
|
||||
Add a new 'server' section with directives as below:
|
||||
```
|
||||
server {
|
||||
listen 80;
|
||||
|
|
|
@ -310,30 +310,18 @@ In this step, you will install myems-web UI service.
|
|||
refer to http://nginx.org/en/linux_packages.html#RHEL
|
||||
|
||||
* Configure NGINX
|
||||
|
||||
Remove default files
|
||||
```bash
|
||||
sudo nano /etc/nginx/nginx.conf
|
||||
```
|
||||
In the 'http' section, add some directives:
|
||||
```
|
||||
http {
|
||||
client_header_timeout 600;
|
||||
client_max_body_size 512M;
|
||||
gzip on;
|
||||
gzip_min_length 512;
|
||||
gzip_proxied any;
|
||||
gzip_types *;
|
||||
gzip_vary on;
|
||||
proxy_buffering off;
|
||||
...
|
||||
|
||||
}
|
||||
sudo rm /etc/nginx/sites-enabled/default
|
||||
sudo rm /etc/nginx/conf.d/default.conf
|
||||
```
|
||||
|
||||
Update the nginx default conf file:
|
||||
Add a new file under /etc/nginx/conf.d/
|
||||
```bash
|
||||
sudo nano /etc/nginx/conf.d/myems-web.conf
|
||||
```
|
||||
sudo nano /etc/nginx/conf.d/default.conf
|
||||
```
|
||||
Write with directives as below, and replace the default myems-api url http://127.0.0.1:8000/ with actual url if the myems-api servcie hosted on different server
|
||||
Add a new 'server' section with directives as below:
|
||||
```
|
||||
server {
|
||||
listen 80;
|
||||
|
|
|
@ -317,30 +317,18 @@ In this step, you will install myems-web UI service.
|
|||
refer to http://nginx.org/en/docs/install.html
|
||||
|
||||
* Configure NGINX
|
||||
```bash
|
||||
nano /etc/nginx/nginx.conf
|
||||
```
|
||||
In the 'http' section, add some directives:
|
||||
```
|
||||
http {
|
||||
client_header_timeout 600;
|
||||
client_max_body_size 512M;
|
||||
gzip on;
|
||||
gzip_min_length 512;
|
||||
gzip_proxied any;
|
||||
gzip_types *;
|
||||
gzip_vary on;
|
||||
proxy_buffering off;
|
||||
...
|
||||
|
||||
}
|
||||
Remove default files
|
||||
```bash
|
||||
sudo rm /etc/nginx/sites-enabled/default
|
||||
sudo rm /etc/nginx/conf.d/default.conf
|
||||
```
|
||||
|
||||
Update the nginx default conf file:
|
||||
Add a new file under /etc/nginx/conf.d/
|
||||
```bash
|
||||
nano /etc/nginx/conf.d/default.conf
|
||||
sudo nano /etc/nginx/conf.d/myems-web.conf
|
||||
```
|
||||
Write with directives as below, and replace the default myems-api url http://127.0.0.1:8000/ with actual url if the myems-api servcie hosted on different server
|
||||
Add a new 'server' section with directives as below:
|
||||
```
|
||||
server {
|
||||
listen 80;
|
||||
|
|
|
@ -351,27 +351,18 @@ refer to http://nginx.org/en/linux_packages.html#RHEL
|
|||
```bash
|
||||
sudo nano /etc/nginx/nginx.conf
|
||||
```
|
||||
In the 'http' section, add some directives:
|
||||
```
|
||||
http {
|
||||
client_header_timeout 600;
|
||||
client_max_body_size 512M;
|
||||
gzip on;
|
||||
gzip_min_length 512;
|
||||
gzip_proxied any;
|
||||
gzip_types *;
|
||||
gzip_vary on;
|
||||
proxy_buffering off;
|
||||
...
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
Update the nginx default conf file:
|
||||
Remove default files
|
||||
```bash
|
||||
sudo nano /etc/nginx/conf.d/default.conf
|
||||
sudo rm /etc/nginx/sites-enabled/default
|
||||
sudo rm /etc/nginx/conf.d/default.conf
|
||||
```
|
||||
Write with directives as below, and replace the default myems-api url http://127.0.0.1:8000/ with actual url if the myems-api servcie hosted on different server
|
||||
|
||||
Add a new file under /etc/nginx/conf.d/
|
||||
```bash
|
||||
sudo nano /etc/nginx/conf.d/myems-web.conf
|
||||
```
|
||||
Add a new 'server' section with directives as below:
|
||||
```
|
||||
server {
|
||||
listen 80;
|
||||
|
|
|
@ -571,47 +571,39 @@ In this step, you will install myems-web UI service.
|
|||
refer to http://nginx.org/en/docs/install.html
|
||||
|
||||
* Configure NGINX
|
||||
|
||||
Remove default files
|
||||
```bash
|
||||
sudo nano /etc/nginx/nginx.conf
|
||||
sudo rm /etc/nginx/sites-enabled/default
|
||||
sudo rm /etc/nginx/conf.d/default.conf
|
||||
```
|
||||
In the 'http' section, add some directives (If already configured in myems-admin, it can be ignored)
|
||||
|
||||
Add a new file under /etc/nginx/conf.d/
|
||||
```bash
|
||||
sudo nano /etc/nginx/conf.d/myems-web.conf
|
||||
```
|
||||
http {
|
||||
client_header_timeout 600;
|
||||
client_max_body_size 512M;
|
||||
gzip on;
|
||||
gzip_min_length 512;
|
||||
gzip_proxied any;
|
||||
gzip_types *;
|
||||
gzip_vary on;
|
||||
proxy_buffering off;
|
||||
|
||||
...
|
||||
Add a new 'server' section with directives as below:
|
||||
```
|
||||
server {
|
||||
listen 80;
|
||||
server_name myems-web;
|
||||
location / {
|
||||
root /var/www/myems-web;
|
||||
index index.html index.htm;
|
||||
# add try_files directive to avoid 404 error while refreshing pages
|
||||
try_files $uri /index.html;
|
||||
}
|
||||
## To avoid CORS issue, use Nginx to proxy myems-api to path /api
|
||||
## Add another location /api in 'server'
|
||||
## NOTE: replace dafault address http://127.0.0.1:8000/ with actual IP or URL
|
||||
location /api {
|
||||
proxy_pass http://127.0.0.1:8000/;
|
||||
proxy_connect_timeout 75;
|
||||
proxy_read_timeout 600;
|
||||
send_timeout 600;
|
||||
}
|
||||
}
|
||||
```
|
||||
In the 'http' section, add a new 'server' section with directives as below:
|
||||
```
|
||||
server {
|
||||
listen 80;
|
||||
server_name myems-web;
|
||||
location / {
|
||||
root /var/www/myems-web;
|
||||
index index.html index.htm;
|
||||
# add try_files directive to avoid 404 error while refreshing pages
|
||||
try_files $uri /index.html;
|
||||
}
|
||||
## To avoid CORS issue, use Nginx to proxy myems-api to path /api
|
||||
## Add another location /api in 'server'
|
||||
## NOTE: replace dafault address http://127.0.0.1:8000/ with actual IP or URL
|
||||
location /api {
|
||||
proxy_pass http://127.0.0.1:8000/;
|
||||
proxy_connect_timeout 75;
|
||||
proxy_read_timeout 600;
|
||||
send_timeout 600;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
* Install MyEMS Web UI:
|
||||
|
||||
|
|
|
@ -331,45 +331,37 @@ In this step, you will install myems-web UI service.
|
|||
refer to http://nginx.org/en/linux_packages.html#Debian
|
||||
|
||||
* Configure NGINX
|
||||
|
||||
Remove default files
|
||||
```bash
|
||||
sudo vi /etc/nginx/nginx.conf
|
||||
```
|
||||
In the 'http' section, add some directives:
|
||||
```
|
||||
http{
|
||||
client_header_timeout 600;
|
||||
client_max_body_size 512M;
|
||||
gzip on;
|
||||
gzip_min_length 512;
|
||||
gzip_proxied any;
|
||||
gzip_types *;
|
||||
gzip_vary on;
|
||||
proxy_buffering off;
|
||||
...
|
||||
|
||||
}
|
||||
sudo rm /etc/nginx/sites-enabled/default
|
||||
sudo rm /etc/nginx/conf.d/default.conf
|
||||
```
|
||||
|
||||
Add a new file under /etc/nginx/conf.d/
|
||||
```bash
|
||||
sudo nano /etc/nginx/conf.d/myems-web.conf
|
||||
```
|
||||
Add a new 'server' section with directives as below:
|
||||
```
|
||||
server {
|
||||
listen 80;
|
||||
server_name myems-web;
|
||||
location / {
|
||||
root /var/www/myems-web;
|
||||
index index.html index.htm;
|
||||
# add try_files directive to avoid 404 error while refreshing pages
|
||||
try_files $uri /index.html;
|
||||
}
|
||||
## To avoid CORS issue, use Nginx to proxy myems-api to path /api
|
||||
## Add another location /api in 'server' and replace demo address http://127.0.0.1:8000/ with actual url
|
||||
location /api {
|
||||
proxy_pass http://127.0.0.1:8000/;
|
||||
proxy_connect_timeout 75;
|
||||
proxy_read_timeout 600;
|
||||
send_timeout 600;
|
||||
}
|
||||
}
|
||||
server {
|
||||
listen 80;
|
||||
server_name myems-web;
|
||||
location / {
|
||||
root /var/www/myems-web;
|
||||
index index.html index.htm;
|
||||
# add try_files directive to avoid 404 error while refreshing pages
|
||||
try_files $uri /index.html;
|
||||
}
|
||||
## To avoid CORS issue, use Nginx to proxy myems-api to path /api
|
||||
## Add another location /api in 'server' and replace demo address http://127.0.0.1:8000/ with actual url
|
||||
location /api {
|
||||
proxy_pass http://127.0.0.1:8000/;
|
||||
proxy_connect_timeout 75;
|
||||
proxy_read_timeout 600;
|
||||
send_timeout 600;
|
||||
}
|
||||
}
|
||||
```
|
||||
Restart NGINX
|
||||
```bash
|
||||
|
|
|
@ -385,29 +385,17 @@ In diesem Schritt installieren Sie den myems-web UI Service.
|
|||
beziehen sich auf http://nginx.org/en/linux_packages.html#RHEL
|
||||
|
||||
* Konfigurieren Sie NGINX
|
||||
Standarddateien entfernen
|
||||
```bash
|
||||
sudo nano /etc/nginx/nginx.conf
|
||||
```
|
||||
Fügen Sie im Abschnitt 'http' einige Anweisungen hinzu:
|
||||
```
|
||||
http {
|
||||
client_header_timeout 600;
|
||||
client_max_body_size 512M;
|
||||
gzip on;
|
||||
gzip_min_length 512;
|
||||
gzip_proxied any;
|
||||
gzip_types *;
|
||||
gzip_vary on;
|
||||
proxy_buffering off;
|
||||
...
|
||||
|
||||
}
|
||||
sudo rm /etc/nginx/sites-enabled/default
|
||||
sudo rm /etc/nginx/conf.d/default.conf
|
||||
```
|
||||
|
||||
Aktualisieren der nginx Standard-Conf-Datei:
|
||||
```
|
||||
sudo nano /etc/nginx/conf.d/default.conf
|
||||
Fügen Sie eine neue Datei unter /etc/nginx/conf.d/
|
||||
```bash
|
||||
sudo nano /etc/nginx/conf.d/myems-web.conf
|
||||
```
|
||||
|
||||
Schreiben Sie mit Direktiven wie unten und ersetzen Sie die Standard-myems-api-URL http://127.0.0.1:8000/ mit tatsächlicher URL, wenn die myems-api-Servcie auf einem anderen Server gehostet wird
|
||||
```
|
||||
server {
|
||||
|
|
|
@ -360,29 +360,17 @@ In diesem Schritt installieren Sie den myems-web UI Service.
|
|||
beziehen sich auf http://nginx.org/en/linux_packages.html#RHEL
|
||||
|
||||
* Konfigurieren Sie NGINX
|
||||
Standarddateien entfernen
|
||||
```bash
|
||||
sudo nano /etc/nginx/nginx.conf
|
||||
```
|
||||
Fügen Sie im Abschnitt 'http' einige Anweisungen hinzu:
|
||||
```
|
||||
http {
|
||||
client_header_timeout 600;
|
||||
client_max_body_size 512M;
|
||||
gzip on;
|
||||
gzip_min_length 512;
|
||||
gzip_proxied any;
|
||||
gzip_types *;
|
||||
gzip_vary on;
|
||||
proxy_buffering off;
|
||||
...
|
||||
|
||||
}
|
||||
sudo rm /etc/nginx/sites-enabled/default
|
||||
sudo rm /etc/nginx/conf.d/default.conf
|
||||
```
|
||||
|
||||
Aktualisieren der nginx Standard-Conf-Datei:
|
||||
Fügen Sie eine neue Datei unter /etc/nginx/conf.d/
|
||||
```bash
|
||||
sudo nano /etc/nginx/conf.d/default.conf
|
||||
sudo nano /etc/nginx/conf.d/myems-web.conf
|
||||
```
|
||||
|
||||
Schreiben Sie mit Direktiven wie unten und ersetzen Sie die Standard-myems-api-URL http://127.0.0.1:8000/ mit tatsächlicher URL, wenn die myems-api-Servcie auf einem anderen Server gehostet wird
|
||||
```
|
||||
server {
|
||||
|
|
|
@ -384,29 +384,17 @@ In diesem Schritt installieren Sie den myems-web UI Service.
|
|||
beziehen sich auf http://nginx.org/en/linux_packages.html#RHEL
|
||||
|
||||
* Konfigurieren Sie NGINX
|
||||
Standarddateien entfernen
|
||||
```bash
|
||||
sudo nano /etc/nginx/nginx.conf
|
||||
```
|
||||
Fügen Sie im Abschnitt 'http' einige Anweisungen hinzu:
|
||||
```
|
||||
http {
|
||||
client_header_timeout 600;
|
||||
client_max_body_size 512M;
|
||||
gzip on;
|
||||
gzip_min_length 512;
|
||||
gzip_proxied any;
|
||||
gzip_types *;
|
||||
gzip_vary on;
|
||||
proxy_buffering off;
|
||||
...
|
||||
|
||||
}
|
||||
sudo rm /etc/nginx/sites-enabled/default
|
||||
sudo rm /etc/nginx/conf.d/default.conf
|
||||
```
|
||||
|
||||
Aktualisieren der nginx Standard-Conf-Datei:
|
||||
Fügen Sie eine neue Datei unter /etc/nginx/conf.d/
|
||||
```bash
|
||||
sudo nano /etc/nginx/conf.d/default.conf
|
||||
sudo nano /etc/nginx/conf.d/myems-web.conf
|
||||
```
|
||||
|
||||
Schreiben Sie mit Direktiven wie unten und ersetzen Sie die Standard-myems-api-URL http://127.0.0.1:8000/ mit tatsächlicher URL, wenn die myems-api-Servcie auf einem anderen Server gehostet wird
|
||||
```
|
||||
server {
|
||||
|
|
|
@ -363,29 +363,17 @@ In diesem Schritt installieren Sie den myems-web UI Service.
|
|||
beziehen sich auf http://nginx.org/en/linux_packages.html#RHEL
|
||||
|
||||
* Konfigurieren Sie NGINX
|
||||
Standarddateien entfernen
|
||||
```bash
|
||||
sudo nano /etc/nginx/nginx.conf
|
||||
```
|
||||
Fügen Sie im Abschnitt 'http' einige Anweisungen hinzu:
|
||||
```
|
||||
http {
|
||||
client_header_timeout 600;
|
||||
client_max_body_size 512M;
|
||||
gzip on;
|
||||
gzip_min_length 512;
|
||||
gzip_proxied any;
|
||||
gzip_types *;
|
||||
gzip_vary on;
|
||||
proxy_buffering off;
|
||||
...
|
||||
|
||||
}
|
||||
sudo rm /etc/nginx/sites-enabled/default
|
||||
sudo rm /etc/nginx/conf.d/default.conf
|
||||
```
|
||||
|
||||
Aktualisieren der nginx Standard-Conf-Datei:
|
||||
Fügen Sie eine neue Datei unter /etc/nginx/conf.d/
|
||||
```bash
|
||||
sudo nano /etc/nginx/conf.d/default.conf
|
||||
sudo nano /etc/nginx/conf.d/myems-web.conf
|
||||
```
|
||||
|
||||
Schreiben Sie mit Direktiven wie unten und ersetzen Sie die Standard-myems-api-URL http://127.0.0.1:8000/ mit tatsächlicher URL, wenn die myems-api-Servcie auf einem anderen Server gehostet wird
|
||||
```
|
||||
server {
|
||||
|
|
|
@ -325,29 +325,17 @@ In diesem Schritt installieren Sie den myems-web UI Service.
|
|||
beziehen sich auf http://nginx.org/en/docs/install.html
|
||||
|
||||
* Konfigurieren Sie NGINX
|
||||
Standarddateien entfernen
|
||||
```bash
|
||||
nano /etc/nginx/nginx.conf
|
||||
```
|
||||
Fügen Sie im Abschnitt 'http' einige Anweisungen hinzu:
|
||||
```
|
||||
http {
|
||||
client_header_timeout 600;
|
||||
client_max_body_size 512M;
|
||||
gzip on;
|
||||
gzip_min_length 512;
|
||||
gzip_proxied any;
|
||||
gzip_types *;
|
||||
gzip_vary on;
|
||||
proxy_buffering off;
|
||||
...
|
||||
|
||||
}
|
||||
sudo rm /etc/nginx/sites-enabled/default
|
||||
sudo rm /etc/nginx/conf.d/default.conf
|
||||
```
|
||||
|
||||
Aktualisieren der nginx Standard-Conf-Datei:
|
||||
Fügen Sie eine neue Datei unter /etc/nginx/conf.d/
|
||||
```bash
|
||||
nano /etc/nginx/conf.d/default.conf
|
||||
sudo nano /etc/nginx/conf.d/myems-web.conf
|
||||
```
|
||||
|
||||
Schreiben Sie mit Direktiven wie unten und ersetzen Sie die Standard-myems-api-URL http://127.0.0.1:8000/ mit tatsächlicher URL, wenn die myems-api-Servcie auf einem anderen Server gehostet wird
|
||||
```
|
||||
server {
|
||||
|
|
|
@ -347,29 +347,17 @@ In diesem Schritt installieren Sie den myems-web UI Service.
|
|||
beziehen sich auf http://nginx.org/en/linux_packages.html#RHEL
|
||||
|
||||
* Konfigurieren Sie NGINX
|
||||
Standarddateien entfernen
|
||||
```bash
|
||||
sudo nano /etc/nginx/nginx.conf
|
||||
```
|
||||
Fügen Sie im Abschnitt 'http' einige Anweisungen hinzu:
|
||||
```
|
||||
http {
|
||||
client_header_timeout 600;
|
||||
client_max_body_size 512M;
|
||||
gzip on;
|
||||
gzip_min_length 512;
|
||||
gzip_proxied any;
|
||||
gzip_types *;
|
||||
gzip_vary on;
|
||||
proxy_buffering off;
|
||||
...
|
||||
|
||||
}
|
||||
sudo rm /etc/nginx/sites-enabled/default
|
||||
sudo rm /etc/nginx/conf.d/default.conf
|
||||
```
|
||||
|
||||
Aktualisieren der nginx Standard-Conf-Datei:
|
||||
Fügen Sie eine neue Datei unter /etc/nginx/conf.d/
|
||||
```bash
|
||||
sudo nano /etc/nginx/conf.d/default.conf
|
||||
sudo nano /etc/nginx/conf.d/myems-web.conf
|
||||
```
|
||||
|
||||
Schreiben Sie mit Direktiven wie unten und ersetzen Sie die Standard-myems-api-URL http://127.0.0.1:8000/ mit tatsächlicher URL, wenn die myems-api-Servcie auf einem anderen Server gehostet wird
|
||||
```
|
||||
server {
|
||||
|
|
|
@ -572,48 +572,40 @@ In diesem Schritt installieren Sie den UI-Dienst myems-web.
|
|||
refer to http://nginx.org/en/docs/install.html
|
||||
|
||||
* Konfigurieren Sie NGINX (Falls bereits in myems-admin konfiguriert, kann ignoriert werden)
|
||||
Standarddateien entfernen
|
||||
```bash
|
||||
sudo nano /etc/nginx/nginx.conf
|
||||
sudo rm /etc/nginx/sites-enabled/default
|
||||
sudo rm /etc/nginx/conf.d/default.conf
|
||||
```
|
||||
Fügen Sie im Abschnitt 'http' einige Direktiven hinzu (falls bereits in myems-admin konfiguriert, kann diese ignoriert werden)
|
||||
```
|
||||
http {
|
||||
client_header_timeout 600;
|
||||
client_max_body_size 512M;
|
||||
gzip on;
|
||||
gzip_min_length 512;
|
||||
gzip_proxied any;
|
||||
gzip_types *;
|
||||
gzip_vary on;
|
||||
proxy_buffering off;
|
||||
|
||||
...
|
||||
Fügen Sie eine neue Datei unter /etc/nginx/conf.d/
|
||||
```bash
|
||||
sudo nano /etc/nginx/conf.d/myems-web.conf
|
||||
```
|
||||
|
||||
Schreiben Sie mit Direktiven wie unten und ersetzen Sie die Standard-myems-api-URL http://127.0.0.1:8000/ mit tatsächlicher URL, wenn die myems-api-Servcie auf einem anderen Server gehostet wird
|
||||
```
|
||||
server {
|
||||
listen 80;
|
||||
server_name myems-web;
|
||||
location / {
|
||||
root /var/www/myems-web;
|
||||
index index.html index.htm;
|
||||
# add try_files directive to avoid 404 error while refreshing pages
|
||||
try_files $uri /index.html;
|
||||
}
|
||||
## To avoid CORS issue, use Nginx to proxy myems-api to path /api
|
||||
## Add another location /api in 'server'
|
||||
## NOTE: replace dafault address http://127.0.0.1:8000/ with actual IP or URL
|
||||
location /api {
|
||||
proxy_pass http://127.0.0.1:8000/;
|
||||
proxy_connect_timeout 75;
|
||||
proxy_read_timeout 600;
|
||||
send_timeout 600;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Löschen Sie den Standardabschnitt „server“ in /etc/nginx/nginx.conf oder in /etc/nginx/conf.d/default.conf und fügen Sie einen neuen Abschnitt „server“ mit den folgenden Anweisungen hinzu:
|
||||
```
|
||||
server {
|
||||
listen 80;
|
||||
server_name myems-web;
|
||||
location / {
|
||||
root /var/www/myems-web;
|
||||
index index.html index.htm;
|
||||
# add try_files directive to avoid 404 error while refreshing pages
|
||||
try_files $uri /index.html;
|
||||
}
|
||||
## To avoid CORS issue, use Nginx to proxy myems-api to path /api
|
||||
## Add another location /api in 'server'
|
||||
## NOTE: replace dafault address http://127.0.0.1:8000/ with actual IP or URL
|
||||
location /api {
|
||||
proxy_pass http://127.0.0.1:8000/;
|
||||
proxy_connect_timeout 75;
|
||||
proxy_read_timeout 600;
|
||||
send_timeout 600;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
* Installieren Sie die MyEMS Web UI:
|
||||
|
||||
Installieren Sie NodeJS:
|
||||
|
|
|
@ -344,29 +344,17 @@ In diesem Schritt installieren Sie den myems-web UI Service.
|
|||
beziehen sich auf http://nginx.org/en/linux_packages.html#Debian
|
||||
|
||||
* Konfigurieren Sie NGINX
|
||||
Standarddateien entfernen
|
||||
```bash
|
||||
sudo vi /etc/nginx/nginx.conf
|
||||
```
|
||||
Fügen Sie im Abschnitt 'http' einige Anweisungen hinzu:
|
||||
```
|
||||
http {
|
||||
client_header_timeout 600;
|
||||
client_max_body_size 512M;
|
||||
gzip on;
|
||||
gzip_min_length 512;
|
||||
gzip_proxied any;
|
||||
gzip_types *;
|
||||
gzip_vary on;
|
||||
proxy_buffering off;
|
||||
...
|
||||
|
||||
}
|
||||
sudo rm /etc/nginx/sites-enabled/default
|
||||
sudo rm /etc/nginx/conf.d/default.conf
|
||||
```
|
||||
|
||||
Aktualisieren der nginx Standard-Conf-Datei:
|
||||
Fügen Sie eine neue Datei unter /etc/nginx/conf.d/
|
||||
```bash
|
||||
sudo vi /etc/nginx/conf.d/default.conf
|
||||
sudo nano /etc/nginx/conf.d/myems-web.conf
|
||||
```
|
||||
|
||||
Schreiben Sie mit Direktiven wie unten und ersetzen Sie die Standard-myems-api-URL http://127.0.0.1:8000/ mit tatsächlicher URL, wenn die myems-api-Servcie auf einem anderen Server gehostet wird
|
||||
```
|
||||
server {
|
||||
|
|
|
@ -383,29 +383,17 @@ cat /myems-aggregation.log
|
|||
参考 http://nginx.org/en/linux_packages.html#Debian
|
||||
|
||||
* 配置 NGINX
|
||||
删除默认文件
|
||||
```bash
|
||||
sudo nano /etc/nginx/nginx.conf
|
||||
```
|
||||
In the 'http' section, add some directives:
|
||||
```
|
||||
http {
|
||||
client_header_timeout 600;
|
||||
client_max_body_size 512M;
|
||||
gzip on;
|
||||
gzip_min_length 512;
|
||||
gzip_proxied any;
|
||||
gzip_types *;
|
||||
gzip_vary on;
|
||||
proxy_buffering off;
|
||||
...
|
||||
|
||||
}
|
||||
sudo rm /etc/nginx/sites-enabled/default
|
||||
sudo rm /etc/nginx/conf.d/default.conf
|
||||
```
|
||||
|
||||
更新nginx默认conf文件:
|
||||
在目录 /etc/nginx/conf.d/ 下添加一个新文件
|
||||
```bash
|
||||
sudo nano /etc/nginx/conf.d/default.conf
|
||||
sudo nano /etc/nginx/conf.d/myems-web.conf
|
||||
```
|
||||
|
||||
使用如下指令编写,如果myems-api服务托管在不同的服务器上,则使用实际的地址替换默认的myems-api地址http://127.0.0.1:8000/
|
||||
```
|
||||
server {
|
||||
|
|
|
@ -357,29 +357,17 @@ cat /myems-aggregation.log
|
|||
参考 http://nginx.org/en/linux_packages.html#Debian
|
||||
|
||||
* 配置 NGINX
|
||||
删除默认文件
|
||||
```bash
|
||||
sudo nano /etc/nginx/nginx.conf
|
||||
```
|
||||
In the 'http' section, add some directives:
|
||||
```
|
||||
http {
|
||||
client_header_timeout 600;
|
||||
client_max_body_size 512M;
|
||||
gzip on;
|
||||
gzip_min_length 512;
|
||||
gzip_proxied any;
|
||||
gzip_types *;
|
||||
gzip_vary on;
|
||||
proxy_buffering off;
|
||||
...
|
||||
|
||||
}
|
||||
sudo rm /etc/nginx/sites-enabled/default
|
||||
sudo rm /etc/nginx/conf.d/default.conf
|
||||
```
|
||||
|
||||
更新nginx默认conf文件:
|
||||
在目录 /etc/nginx/conf.d/ 下添加一个新文件
|
||||
```bash
|
||||
sudo nano /etc/nginx/conf.d/default.conf
|
||||
sudo nano /etc/nginx/conf.d/myems-web.conf
|
||||
```
|
||||
|
||||
使用如下指令编写,如果myems-api服务托管在不同的服务器上,则使用实际的地址替换默认的myems-api地址http://127.0.0.1:8000/
|
||||
```
|
||||
server {
|
||||
|
|
|
@ -380,29 +380,17 @@ cat /myems-aggregation.log
|
|||
参考 http://nginx.org/en/linux_packages.html#Debian
|
||||
|
||||
* 配置 NGINX
|
||||
删除默认文件
|
||||
```bash
|
||||
sudo nano /etc/nginx/nginx.conf
|
||||
```
|
||||
In the 'http' section, add some directives:
|
||||
```
|
||||
http {
|
||||
client_header_timeout 600;
|
||||
client_max_body_size 512M;
|
||||
gzip on;
|
||||
gzip_min_length 512;
|
||||
gzip_proxied any;
|
||||
gzip_types *;
|
||||
gzip_vary on;
|
||||
proxy_buffering off;
|
||||
...
|
||||
|
||||
}
|
||||
sudo rm /etc/nginx/sites-enabled/default
|
||||
sudo rm /etc/nginx/conf.d/default.conf
|
||||
```
|
||||
|
||||
更新nginx默认conf文件:
|
||||
在目录 /etc/nginx/conf.d/ 下添加一个新文件
|
||||
```bash
|
||||
sudo nano /etc/nginx/conf.d/default.conf
|
||||
sudo nano /etc/nginx/conf.d/myems-web.conf
|
||||
```
|
||||
|
||||
使用如下指令编写,如果myems-api服务托管在不同的服务器上,则使用实际的地址替换默认的myems-api地址http://127.0.0.1:8000/
|
||||
```
|
||||
server {
|
||||
|
|
|
@ -360,29 +360,17 @@ cat /myems-aggregation.log
|
|||
参考 http://nginx.org/en/linux_packages.html#Debian
|
||||
|
||||
* 配置 NGINX
|
||||
删除默认文件
|
||||
```bash
|
||||
sudo nano /etc/nginx/nginx.conf
|
||||
```
|
||||
In the 'http' section, add some directives:
|
||||
```
|
||||
http {
|
||||
client_header_timeout 600;
|
||||
client_max_body_size 512M;
|
||||
gzip on;
|
||||
gzip_min_length 512;
|
||||
gzip_proxied any;
|
||||
gzip_types *;
|
||||
gzip_vary on;
|
||||
proxy_buffering off;
|
||||
...
|
||||
|
||||
}
|
||||
sudo rm /etc/nginx/sites-enabled/default
|
||||
sudo rm /etc/nginx/conf.d/default.conf
|
||||
```
|
||||
|
||||
更新nginx默认conf文件:
|
||||
在目录 /etc/nginx/conf.d/ 下添加一个新文件
|
||||
```bash
|
||||
sudo nano /etc/nginx/conf.d/default.conf
|
||||
sudo nano /etc/nginx/conf.d/myems-web.conf
|
||||
```
|
||||
|
||||
使用如下指令编写,如果myems-api服务托管在不同的服务器上,则使用实际的地址替换默认的myems-api地址http://127.0.0.1:8000/
|
||||
```
|
||||
server {
|
||||
|
|
|
@ -314,29 +314,17 @@ monit restart
|
|||
参考 http://nginx.org/en/docs/install.html
|
||||
|
||||
* 配置 NGINX
|
||||
删除默认文件
|
||||
```bash
|
||||
nano /etc/nginx/nginx.conf
|
||||
```
|
||||
In the 'http' section, add some directives:
|
||||
```
|
||||
http {
|
||||
client_header_timeout 600;
|
||||
client_max_body_size 512M;
|
||||
gzip on;
|
||||
gzip_min_length 512;
|
||||
gzip_proxied any;
|
||||
gzip_types *;
|
||||
gzip_vary on;
|
||||
proxy_buffering off;
|
||||
...
|
||||
|
||||
}
|
||||
sudo rm /etc/nginx/sites-enabled/default
|
||||
sudo rm /etc/nginx/conf.d/default.conf
|
||||
```
|
||||
|
||||
更新nginx默认conf文件:
|
||||
在目录 /etc/nginx/conf.d/ 下添加一个新文件
|
||||
```bash
|
||||
nano /etc/nginx/conf.d/default.conf
|
||||
sudo nano /etc/nginx/conf.d/myems-web.conf
|
||||
```
|
||||
|
||||
使用如下指令编写,如果myems-api服务托管在不同的服务器上,则使用实际的地址替换默认的myems-api地址http://127.0.0.1:8000/
|
||||
```
|
||||
server {
|
||||
|
|
|
@ -344,29 +344,17 @@ cat /myems-aggregation.log
|
|||
参考 http://nginx.org/en/linux_packages.html#Debian
|
||||
|
||||
* 配置 NGINX
|
||||
删除默认文件
|
||||
```bash
|
||||
sudo nano /etc/nginx/nginx.conf
|
||||
```
|
||||
In the 'http' section, add some directives:
|
||||
```
|
||||
http {
|
||||
client_header_timeout 600;
|
||||
client_max_body_size 512M;
|
||||
gzip on;
|
||||
gzip_min_length 512;
|
||||
gzip_proxied any;
|
||||
gzip_types *;
|
||||
gzip_vary on;
|
||||
proxy_buffering off;
|
||||
...
|
||||
|
||||
}
|
||||
sudo rm /etc/nginx/sites-enabled/default
|
||||
sudo rm /etc/nginx/conf.d/default.conf
|
||||
```
|
||||
|
||||
更新nginx默认conf文件:
|
||||
在目录 /etc/nginx/conf.d/ 下添加一个新文件
|
||||
```bash
|
||||
sudo nano /etc/nginx/conf.d/default.conf
|
||||
sudo nano /etc/nginx/conf.d/myems-web.conf
|
||||
```
|
||||
|
||||
使用如下指令编写,如果myems-api服务托管在不同的服务器上,则使用实际的地址替换默认的myems-api地址http://127.0.0.1:8000/
|
||||
```
|
||||
server {
|
||||
|
|
|
@ -557,48 +557,40 @@ cat /myems-aggregation.log
|
|||
参考 http://nginx.org/en/docs/install.html
|
||||
|
||||
* 配置 NGINX
|
||||
删除默认文件
|
||||
```bash
|
||||
sudo nano /etc/nginx/nginx.conf
|
||||
sudo rm /etc/nginx/sites-enabled/default
|
||||
sudo rm /etc/nginx/conf.d/default.conf
|
||||
```
|
||||
在 'http' 结构中添加一些指令 (如在myems-admin中已配置,可以忽略)
|
||||
```
|
||||
http {
|
||||
client_header_timeout 600;
|
||||
client_max_body_size 512M;
|
||||
gzip on;
|
||||
gzip_min_length 512;
|
||||
gzip_proxied any;
|
||||
gzip_types *;
|
||||
gzip_vary on;
|
||||
proxy_buffering off;
|
||||
...
|
||||
|
||||
在目录 /etc/nginx/conf.d/ 下添加一个新文件
|
||||
```bash
|
||||
sudo nano /etc/nginx/conf.d/myems-web.conf
|
||||
```
|
||||
|
||||
使用如下指令编写,如果myems-api服务托管在不同的服务器上,则使用实际的地址替换默认的myems-api地址http://127.0.0.1:8000/
|
||||
```
|
||||
server {
|
||||
listen 80;
|
||||
server_name myems-web;
|
||||
location / {
|
||||
root /var/www/myems-web;
|
||||
index index.html index.htm;
|
||||
# add try_files directive to avoid 404 error while refreshing pages
|
||||
try_files $uri /index.html;
|
||||
}
|
||||
## To avoid CORS issue, use Nginx to proxy myems-api to path /api
|
||||
## Add another location /api in 'server'
|
||||
## NOTE: replace dafault address http://127.0.0.1:8000/ with actual IP or URL
|
||||
location /api {
|
||||
proxy_pass http://127.0.0.1:8000/;
|
||||
proxy_connect_timeout 75;
|
||||
proxy_read_timeout 600;
|
||||
send_timeout 600;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
在 'http' 结构中添加一个新的 'server' 结构,其指令如下:
|
||||
```
|
||||
server {
|
||||
listen 80;
|
||||
server_name myems-web;
|
||||
location / {
|
||||
root /var/www/myems-web;
|
||||
index index.html index.htm;
|
||||
# add try_files directive to avoid 404 error while refreshing pages
|
||||
try_files $uri /index.html;
|
||||
}
|
||||
## To avoid CORS issue, use Nginx to proxy myems-api to path /api
|
||||
## Add another location /api in 'server'
|
||||
## NOTE: replace dafault address http://127.0.0.1:8000/ with actual IP or URL
|
||||
location /api {
|
||||
proxy_pass http://127.0.0.1:8000/;
|
||||
proxy_connect_timeout 75;
|
||||
proxy_read_timeout 600;
|
||||
send_timeout 600;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
* 安装 MyEMS Web UI:
|
||||
|
||||
安装NodeJS:
|
||||
|
|
|
@ -338,50 +338,38 @@ cat /myems-aggregation.log
|
|||
参考 http://nginx.org/en/linux_packages.html#Debian
|
||||
|
||||
* 配置 NGINX
|
||||
删除默认文件
|
||||
```bash
|
||||
sudo vi /etc/nginx/nginx.conf
|
||||
```
|
||||
In the 'http' section, add some directives:
|
||||
```
|
||||
http {
|
||||
client_header_timeout 600;
|
||||
client_max_body_size 512M;
|
||||
gzip on;
|
||||
gzip_min_length 512;
|
||||
gzip_proxied any;
|
||||
gzip_types *;
|
||||
gzip_vary on;
|
||||
proxy_buffering off;
|
||||
...
|
||||
|
||||
}
|
||||
sudo rm /etc/nginx/sites-enabled/default
|
||||
sudo rm /etc/nginx/conf.d/default.conf
|
||||
```
|
||||
|
||||
更新nginx默认conf文件:
|
||||
在目录 /etc/nginx/conf.d/ 下添加一个新文件
|
||||
```bash
|
||||
sudo vi /etc/nginx/conf.d/default.conf
|
||||
sudo nano /etc/nginx/conf.d/myems-web.conf
|
||||
```
|
||||
|
||||
使用如下指令编写,如果myems-api服务托管在不同的服务器上,则使用实际的地址替换默认的myems-api地址http://127.0.0.1:8000/
|
||||
```
|
||||
server {
|
||||
listen 80;
|
||||
server_name myems-web;
|
||||
location / {
|
||||
root /var/www/myems-web;
|
||||
index index.html index.htm;
|
||||
# add try_files directive to avoid 404 error while refreshing pages
|
||||
try_files $uri /index.html;
|
||||
}
|
||||
## To avoid CORS issue, use Nginx to proxy myems-api to path /api
|
||||
## Add another location /api in 'server'
|
||||
## replace the default myems-api url http://127.0.0.1:8000/ with actual url if the myems-api servcie hosted on different server
|
||||
location /api {
|
||||
proxy_pass http://127.0.0.1:8000/;
|
||||
proxy_connect_timeout 75;
|
||||
proxy_read_timeout 600;
|
||||
send_timeout 600;
|
||||
}
|
||||
}
|
||||
server {
|
||||
listen 80;
|
||||
server_name myems-web;
|
||||
location / {
|
||||
root /var/www/myems-web;
|
||||
index index.html index.htm;
|
||||
# add try_files directive to avoid 404 error while refreshing pages
|
||||
try_files $uri /index.html;
|
||||
}
|
||||
## To avoid CORS issue, use Nginx to proxy myems-api to path /api
|
||||
## Add another location /api in 'server'
|
||||
## replace the default myems-api url http://127.0.0.1:8000/ with actual url if the myems-api servcie hosted on different server
|
||||
location /api {
|
||||
proxy_pass http://127.0.0.1:8000/;
|
||||
proxy_connect_timeout 75;
|
||||
proxy_read_timeout 600;
|
||||
send_timeout 600;
|
||||
}
|
||||
}
|
||||
```
|
||||
* 安装 MyEMS Web UI:
|
||||
|
||||
|
|
Loading…
Reference in New Issue