nginx 安装
Last updated on November 20, 2024 am
🧙 Questions
☄️ Ideas
linux安装
sudo yum install -y nginx
- 默认config目录:
/etc/nginx/nginx.conf
- 默认html目录:
/usr/share/nginx/html
- 默认日志目录:
/var/log/nginx/access.log
- 默认bin目录:
/usr/sbin/nginx
启动项目
nginx
源码安装
wget http://nginx.org/download/nginx-1.20.2.tar.gz
sudo apt-get install libpcre3 libpcre3-dev
sudo apt-get install zlib1g-dev
sudo apt-get install openssl libssl
./configure --prefix=/opt/elap/embedded --conf-path=/opt/elap/conf/nginx/nginx.conf --http-log-path=/var/log/elap/nginx/access.log --error-log-path=/var/log/elap/nginx/error.log --with-http_ssl_module --with-http_stub_status_module --with-debug --with-ld-opt=-L/opt/elap/embedded/lib --with-cc-opt='-L/opt/elap/embedded/lib -I/opt/elap/embedded/include' --with-stream
make -j8
make install
/opt/elap/embedded
/opt/elap/conf/nginx/nginx.conf
/opt/elap/embedded/sbin/nginx
stream {
server {
listen 8088;
listen [::]:8088;
proxy_pass 10.9.6.1:31013;
proxy_timeout 100s;
proxy_connect_timeout 100s;
}
}
🔗 Links
nginx 安装
https://ispong.isxcode.com/vue/nginx/nginx 安装/