armbian nginx 1.18设置81端口和目录浏览

 cat /etc/nginx/sites-enabled/default
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# https://www.nginx.com/resources/wiki/start/
# https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
# https://wiki.debian.org/Nginx/DirectoryStructure
#
# In most cases, administrators will remove this file from sites-enabled/ and
# leave it as reference inside of sites-available where it will continue to be
# updated by the nginx packaging team.
#
# This file will automatically load configuration files provided by other
# applications, such as Drupal or Wordpress. These applications will be made
# available underneath a path with that package name, such as /drupal8.
#
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##

# Default server configuration
#
server {
	listen 81 default_server;
	listen [::]:81 default_server;

	# SSL configuration
	#
	# listen 443 ssl default_server;
	# listen [::]:443 ssl default_server;
	#
	# Note: You should disable gzip for SSL traffic.
	# See: https://bugs.debian.org/773332
	#
	# Read up on ssl_ciphers to ensure a secure configuration.
	# See: https://bugs.debian.org/765782
	#
	# Self signed certs generated by the ssl-cert package
	# Don't use them in a production server!
	#
	# include snippets/snakeoil.conf;

	#root /var/www/html;
	root /sda1;

	# Add index.php to the list if you are using PHP
	index index.php index.html index.htm index.nginx-debian.html;

	server_name _;

	location / {
                autoindex on;
                autoindex_exact_size off;
                charset utf-8;
		# First attempt to serve request as file, then
		# as directory, then fall back to displaying a 404.
		try_files $uri $uri/ =404;
	}
	# pass PHP scripts to FastCGI server
	#
	location ~ \.php$ {
	#	include snippets/fastcgi-php.conf;
	#
	#	# With php-fpm (or other unix sockets):
		fastcgi_pass unix:/run/php/php7.4-fpm.sock;
	#	# With php-cgi (or other tcp sockets):
	#	fastcgi_pass 127.0.0.1:9000;
	}

	# deny access to .htaccess files, if Apache's document root
	# concurs with nginx's one
	#
	#location ~ /\.ht {
	#	deny all;
	#}
}


# Virtual Host configuration for example.com
#
# You can move that to a different file under sites-available/ and symlink that
# to sites-enabled/ to enable it.
#
#server {
#	listen 80;
#	listen [::]:80;
#
#	server_name example.com;
#
#	root /var/www/example.com;
#	index index.html;
#
#	location / {
#		try_files $uri $uri/ =404;
#	}
#}

nginx是一种高性能的Web服务器和反向代理服务器软件,可以在Linux、Windows、UNIX等操作系统上运行。它以其稳定性、高并发性和低内存消耗而受到广泛关注和使用。 nginx 1.18nginx的一个版本,其中包含了一系列的新特性和改进。这个版本引入了新的HTTP/2服务器推送功能,提供了更好的性能和可扩展性。同时,该版本还增加了对TLS 1.3的支持,加强了传输层安全性。此外,nginx 1.18还改进了负载均衡算法,提高了对后端服务器的请求分发效率。总之,nginx 1.18在性能、安全性和功能上都有所提升,是一个值得使用的版本。 nginx-mod-stream是一个nginx模块,用于处理TCP/UDP流量。它提供了一系列的功能,如四层(网络层)和七层(应用层)的负载均衡、流量分片、数据重定向等。通过使用nginx-mod-stream,我们可以在一个单独的nginx服务器上同时处理HTTP和TCP/UDP流量,增加了服务器的灵活性和可扩展性。 通过将nginx 1.18nginx-mod-stream结合使用,我们可以构建一个强大的、高性能的网络架构。nginx 1.18提供了优秀的HTTP服务和反向代理能力,而nginx-mod-stream则提供了处理TCP/UDP流量的功能。这样可以让我们的应用程序更加灵活,在一个服务器上同时处理不同类型的流量,提高服务器的利用率和性能。因此,nginx 1.18nginx-mod-stream是两个重要的组件,能够帮助我们构建高效的网络架构。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值