查看配置文件目录命令:whereis nginx
修改配置文件
server {
listen 80;
server_name localhost;
charset utf-8;
client_max_body_size 1000m;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
location / {
root /dist/;
index index.html;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
listen 443 ssl;
server_name localhost;
ssl_certificate /cert/214473767760857.pem;
ssl_certificate_key /cert/214473767760857.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_prefer_server_ciphers on;
location / {
proxy_pass http://localhost:8080;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}