yum -y install gcc pcre pcre-devel zlib zlib-devel openssl openssl-devel
wget http://nginx.org/download/nginx-1.15.8.tar.gz
tar -zxvf nginx-1.15.8.tar.gz
./configure --prefix=/usr/local/nginx
make && make install
/usr/local/nginx/sbin/nginx
ps -ef | grep nginx
server {
listen 8008;
server_name localhost;
root /usr/myfile/dist;
index index.html;
}
server {javascript
server_name vue.wtodd.wang;
charset utf-8;
location /nodejsapi/ {
proxy_pass http://localhost:5000/;
}
}
server {
listen 80;
server_name csa.scampus.cn;
location / {
proxy_pass http://127.0.0.1:8000;
}
}
server {
listen 80;
server_name api.scampus.cn;
rewrite ^ https://$http_host$request_uri? permanent;
}
server {
listen 443;
ssl_certificate /etc/nginx/ssl/alyca.pem;
ssl_certificate_key /etc/nginx/ssl/alyca.key;
server_name api.scampus.cn;
ssl on;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
location / {
proxy_pass http://localhost:4000/;
}
}