nginx-htpasswd實現用戶登錄

yum -y install httpd

nginx-htpasswd實現用戶登錄

htpasswd -c /usr/local/nginx/html/.htpasswd admin

nginx-htpasswd實現用戶登錄

/usr/local/nginx/sbin/nginx -V

nginx-htpasswd實現用戶登錄

./configure –user=www –group=www –prefix=/usr/local/nginx –with-http_stub_status_module –with-openssl=/usr/local/nginx –with-http_stub_status_module


nginx-htpasswd實現用戶登錄


make

make install

vim vhost/192.168.44.20.conf

nginx-htpasswd實現用戶登錄

/usr/local/nginx/sbin/nginx -t

nginx-htpasswd實現用戶登錄

/usr/local/nginx/sbin/nginx -s reload

http://192.168.44.20/

nginx-htpasswd實現用戶登錄


分享到:


相關文章: