nginx settingx vuejs frontend nodejs api apps
#nginx settings
server {
listen 80;
listen [::]:80;
#listen 443 ssl;
#listen [::]:443 ssl;
server_name example.com www.example.com;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
# vue app & front-end files
location / {
root /var/www/html/my-project/public/;
try_files $uri /index.html;
}
# node api reverse proxy
location /api/ {
proxy_pass http://localhost:5000/;
}
}
server {
listen 80;
listen [::]:80;
#listen 443 ssl;
#listen [::]:443 ssl;
server_name example.com www.example.com;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
# vue app & front-end files
location / {
root /var/www/html/my-project/public/;
try_files $uri /index.html;
}
# node api reverse proxy
location /api/ {
proxy_pass http://localhost:5000/;
}
}
Comments
Post a Comment